【发布时间】:2022-06-23 19:45:42
【问题描述】:
Java 实现继续正常工作,但 Python 实现在升级到 4.10.1 之前也一直正常工作,现在在调整 ATNDeserializer.py 时在第 89 行抛出 TypeError
这是一个已知的错误吗?
Traceback (most recent call last):
File "/Users/vickery/Projects/dgw_processor/dgw_parser.py", line 15, in <module>
from ReqBlockLexer import ReqBlockLexer
File "/Users/vickery/Projects/dgw_processor/ReqBlockLexer.py", line 421, in <module>
class ReqBlockLexer(Lexer):
File "/Users/vickery/Projects/dgw_processor/ReqBlockLexer.py", line 423, in ReqBlockLexer
atn = ATNDeserializer().deserialize(serializedATN())
File "/opt/homebrew/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 61, in deserialize
self.reset(data)
File "/opt/homebrew/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 91, in reset
temp = [ adjust(c) for c in data ]
File "/opt/homebrew/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 91, in <listcomp>
temp = [ adjust(c) for c in data ]
File "/opt/homebrew/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 89, in adjust
v = ord(c)
TypeError: ord() expected string of length 1, but int found
【问题讨论】: