Skip to content

Error in cparser.py  #1

Description

@harshitalpha

Hello,
Thanks for such a great repository.
I am getting the error while using the intractive_predict_c.py.
I had run the following command

bash predict.sh

Everything is going fine, Model loaded its weights successfully.
I am getting the following error

Executing: python3 ../cparser.py --clang-path /usr/lib/python3/dist-packages/clang --max-leaves 320 --no-hash-paths TRUE --file-path input.c
Exception parsing dirctory
  File "../cparser.py", line 254, in <module>
    main()
  File "../cparser.py", line 60, in main
    index = Index.create()
  File "/usr/lib/python3/dist-packages/clang/cindex.py", line 2698, in create
    return Index(conf.lib.clang_createIndex(excludeDecls, 0))
  File "/usr/lib/python3/dist-packages/clang/cindex.py", line 212, in __get__
    value = self.wrapped(instance)
  File "/usr/lib/python3/dist-packages/clang/cindex.py", line 4146, in lib
    lib = self.get_cindex_library()
  File "/usr/lib/python3/dist-packages/clang/cindex.py", line 4177, in get_cindex_library
    raise LibclangError(msg)

I have downloaded the cparser by the following command

sudo apt-get install python-clang

and when I run the following command

python -c"import clang.cindex; import inspect; print(inspect.getfile(clang.cindex))"

get the following output

/usr/lib/python3/dist-packages/clang/cindex.py

what should be the problem? Am I missing something?
It will be great if I get some help with this.

Regards
Harshit Singhal

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions