Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang.cindex.TranslationUnitLoadError: Error parsing translation unit #28

Open
nyckmaia opened this issue Jan 11, 2023 · 0 comments
Open

Comments

@nyckmaia
Copy link

Hi, I'm trying to run the pybind11_mkdoc in a single file called score.h, but I got this error below:

C:\Users\nyck\Desktop\maialib>python -m pybind11_mkdoc maiacore\include\maiacore\score.h
Processing "'maiacore\include\maiacore\score.h'" ..
Waiting for jobs to finish ..
error: error reading ''maiacore\include\maiacore\score.h''
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\nyck\AppData\Roaming\Python\Python310\site-packages\pybind11_mkdoc\mkdoc_lib.py", line 246, in run
    tu = index.parse(self.filename, self.parameters)
  File "C:\Users\nyck\AppData\Roaming\Python\Python310\site-packages\clang\cindex.py", line 2722, in parse
    return TranslationUnit.from_source(path, args, unsaved_files, options,
  File "C:\Users\nyck\AppData\Roaming\Python\Python310\site-packages\clang\cindex.py", line 2837, in from_source
    raise TranslationUnitLoadError("Error parsing translation unit.")
clang.cindex.TranslationUnitLoadError: Error parsing translation unit.

The file score.h is a valid C++ header that contains a valid Doxygen documentation in it.

Please, could you help me?

My system:

  • Windows 10 x64
  • Clang LLVM 15.0.6 installed
  • Python 3.10
  • pybind11_mkdoc-2.6.2.dev1 (filename=pybind11_mkdoc-2.6.2.dev1-py3-none-any.whl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant