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))
1
  • your code please Commented Jun 11, 2019 at 11:03

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.