2to3 ParseError in python file
Asked Answered
S

1

1

I tried running 2to3 on a python file however it is failing with following error, i am not able to understand where exactly in the problem any help is appreciated.

[adsf@localhost direct]$ 2to3 ./views/statusformatter.py 
RefactoringTool: Skipping implicit fixer: buffer 
RefactoringTool: Skipping implicit fixer: idioms 
RefactoringTool: Skipping implicit fixer: set_literal 
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Can't parse ./views/statusformatter.py: ParseError:
bad input: type=22, value=u'=', context=('', (338, 31))
RefactoringTool: No files need to be modified. 
RefactoringTool: There was 1 error: 
RefactoringTool: Can't parse ./views/statusformatter.py:
ParseError: bad input: type=22, value=u'=', context=('', (338, 31))
Sphinx answered 10/6, 2019 at 9:21 Comment(1)
your code pleaseApothegm
G
1

As answered by @wovano in my question regarding a similar (or as the matter of fact, probably the same) problem, 2to3 fails to parse as this is a proper Python 3 syntax and not Python 2. In my particular case, and as it seems it could be a case also here, it was named argument of the print function that does not exist in Python 2.

Grisons answered 14/8, 2019 at 11:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.