Running Jetbrain PyCharm 2021.3 on Windows with Python 3.7.9 (64-bit) installed.
The code is simple:
homedir=os.path.expanduser('~')
Here is a picure in the IDE line 32:
Have anyone seen this type of parsing error? Is this unique to Windows, Python version installed or Jetbrain Issue? Any clue will be helpful.
CodePudding user response:
I notice from the screenshot that the file you are editing with python has an extension of .sh
. I think that the extension is being used by pycharm to determine how to parse the file and it is getting confused. I recommend you try switching the extension to .py
.