叮当作响';s python绑定在调用get_children时引发异常
我试图运行一个找到的示例,但它总是无法执行。经过一些调试,我发现node.get_children()导致了异常,以下是回溯:叮当作响';s python绑定在调用get_children时引发异常,python,parsing,clang,Python,Parsing,Clang,我试图运行一个找到的示例,但它总是无法执行。经过一些调试,我发现node.get_children()导致了异常,以下是回溯: Traceback (most recent call last): File "_ctypes/callbacks.c", line 314, in 'calling callback function' File "C:\Python27\lib\site-packages\clang\cindex.py", line 1383, in visitor childr
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 314, in 'calling callback function'
File "C:\Python27\lib\site-packages\clang\cindex.py", line 1383, in visitor
children.append(child)
AttributeError: 'str' object has no attribute 'append'
我在Windows上使用LLVM 4.0.1,并通过pip安装了clang(尝试了clang3.5和clang4.0.post1)
这是我的LD_库路径:C:\Program Files\LLVM\bin,我将其添加到我的
像这样的路径:%LD_LIBRARY_PATH%;%PYTHONPATH%;。。。剩下的路
在安装LLVM5.0并从github克隆clang之后,我遇到了相同的错误
编辑:我使用了Python2.7,但在切换到Python3.6.3之后,一切正常。切换到Python3.6解决了问题