You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error I got is below, it includes the bit of code that caused it. (qt_py_convert is our local tool for converting python code from using PyQt4 to QtPy.) I've gotten the same error for the following three types of Python print statements:
print 'Some message'
print 'Some message %s' % var
msg = 'Some message'
print msg
Putting parentheses around the item being printed makes the parsing error go away.
------- the error -------
Traceback (most recent call last):
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/run.py", line 558, in run
red = redbaron.RedBaron(text)
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/redbaron/redbaron.py", line 36, in init
self.node_list = base_nodes.NodeList.from_fst(baron.parse(source_code), parent=self, on_attribute="root")
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/baron/baron.py", line 66, in parse
return _parse(tokens, print_function)
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/baron/baron.py", line 26, in _parse
raise e
ParsingError: Error, got an unexpected token NAME here:
The token NAME should be one of those: AMPER_EQUAL, CIRCUMFLEX_EQUAL, COLON, COMMA, COMMENT, DOUBLE_SLASH_EQUAL, DOUBLE_STAR_EQUAL, ENDL, EQUAL, LEFT_SHIFT_EQUAL, MINUS_EQUAL, PERCENT_EQUAL, PLUS_EQUAL, RIGHT_PARENTHESIS, RIGHT_SHIFT_EQUAL, SEMICOLON, SLASH_EQUAL, STAR_EQUAL, VBAR_EQUAL
It is not normal that you see this error, it means that Baron has failed to parse valid Python code. It would be kind if you can extract the snippet of your code that makes Baron fail and open a bug here: https://github.com/Psycojoker/baron/issues
The text was updated successfully, but these errors were encountered:
The error I got is below, it includes the bit of code that caused it. (qt_py_convert is our local tool for converting python code from using PyQt4 to QtPy.) I've gotten the same error for the following three types of Python print statements:
print msg
Putting parentheses around the item being printed makes the parsing error go away.
------- the error -------
Traceback (most recent call last):
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/run.py", line 558, in run
red = redbaron.RedBaron(text)
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/redbaron/redbaron.py", line 36, in init
self.node_list = base_nodes.NodeList.from_fst(baron.parse(source_code), parent=self, on_attribute="root")
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/baron/baron.py", line 66, in parse
return _parse(tokens, print_function)
File "/dd/tools/cent6_64/package/qt_py_convert/0.8.0/python/qt_py_convert/external/baron/baron.py", line 26, in _parse
raise e
ParsingError: Error, got an unexpected token NAME here:
778
779 result = ngcmds.redo()
780
781 # update previous selection
782 try:
783 self.dag_viewer.updateSelection()
784 except RuntimeError, msg:
785 print msg<---- here
The token NAME should be one of those: AMPER_EQUAL, CIRCUMFLEX_EQUAL, COLON, COMMA, COMMENT, DOUBLE_SLASH_EQUAL, DOUBLE_STAR_EQUAL, ENDL, EQUAL, LEFT_SHIFT_EQUAL, MINUS_EQUAL, PERCENT_EQUAL, PLUS_EQUAL, RIGHT_PARENTHESIS, RIGHT_SHIFT_EQUAL, SEMICOLON, SLASH_EQUAL, STAR_EQUAL, VBAR_EQUAL
It is not normal that you see this error, it means that Baron has failed to parse valid Python code. It would be kind if you can extract the snippet of your code that makes Baron fail and open a bug here: https://github.com/Psycojoker/baron/issues
The text was updated successfully, but these errors were encountered: