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

pygrun is wrong #14

Open
Grit-he opened this issue May 28, 2022 · 1 comment
Open

pygrun is wrong #14

Grit-he opened this issue May 28, 2022 · 1 comment

Comments

@Grit-he
Copy link

Grit-he commented May 28, 2022

when i run pygrun Hello r --tokens input.txt
Traceback (most recent call last):
File "/home/hehongbin/桌面/py3antlr4book-master/bin/pygrun", line 178, in
module_lexer = import(lexerName, globals(), locals(), lexerName)
File "/home/hehongbin/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "/home/hehongbin/桌面/py3antlr4book-master/01-Hello/./HelloLexer.py", line 25, in
class HelloLexer(Lexer):
File "/home/hehongbin/桌面/py3antlr4book-master/01-Hello/./HelloLexer.py", line 27, in HelloLexer
atn = ATNDeserializer().deserialize(serializedATN())
File "/usr/local/lib/python3.8/dist-packages/antlr4/atn/ATNDeserializer.py", line 28, in deserialize
self.checkVersion()
File "/usr/local/lib/python3.8/dist-packages/antlr4/atn/ATNDeserializer.py", line 50, in checkVersion
raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").")
Exception: Could not deserialize ATN with version (expected 4).
this question arises, how can i solve this question?thanks

@t0hka1
Copy link

t0hka1 commented Nov 10, 2022

Try to run this command and your problem will be solve!
pip install antlr4-python3-runtime==4.7.2

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

2 participants