Closed dargueta closed 3 years ago
It looks like the fix for #11 (and this one) is in the repo, but there has no been a release since then. A new package needs to be released to include it.
Issue is still present when using the xml output.
Luaparser is from master.
Traceback (most recent call last):
File "/usr/bin/luaparser", line 33, in <module>
sys.exit(load_entry_point('luaparser==3.0.0', 'console_scripts', 'luaparser')())
File "/usr/lib/python3.9/site-packages/luaparser/__main__.py", line 56, in main
output = ast.to_xml_str(tree)
File "/usr/lib/python3.9/site-packages/luaparser/ast.py", line 46, in to_xml_str
return tree_visitor.get_xml_string(tree)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 160, in get_xml_string
xml = self.visit(tree)
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 37, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 197, in visit
child_node = self.visit(attrValue)
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 37, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 197, in visit
child_node = self.visit(attrValue)
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 29, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 186, in visit
xml_nodes.append(self.visit(itemValue))
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 37, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 197, in visit
child_node = self.visit(attrValue)
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 29, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 186, in visit
xml_nodes.append(self.visit(itemValue))
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 37, in _visitor_impl
return method(self, arg)
File "/usr/lib/python3.9/site-packages/luaparser/printers.py", line 197, in visit
child_node = self.visit(attrValue)
File "/usr/lib/python3.9/site-packages/luaparser/utils/visitor.py", line 40, in _visitor_impl
raise VisitorException('No visitor found for class ' + str(type(arg)))
luaparser.utils.visitor.VisitorException: No visitor found for class <enum 'StringDelimiter'>
yep this is now fixed in 3.0.1
Thanks!
I know Python 3.8 isn't listed in the supported versions, but the Hello World example in the README is crashing with the same error as issue #11 and I'm wondering if the cause might be something similar.
Environment:
luaparser==3.0.0
antlr4-python3-runtime==4.7.2