Pycharm shows Unresolved reference 'unicode' in py2 project after upgrade to 2023.1
When I open the python2.7 project in 2023.1 version, it shows 👇🏻. However, the 2022.2.3 version can successfully recognize this key word.
Please sign in to leave a comment.
PyCharm 2023.1 (Professional Edition)
Build #PY-231.8109.197, built on March 29, 2023
Could you please show the code snippet where `unicode` is defined in your case?
Hi Andrey, thanks for your reply.
Sorry for the incomplete description of my post that misleads you to answer my question.
Python 2 has two types that let the user works with text, one of them is the 'unicode' type, therefor the key word of 'unicode' should be automatically highlighted without any specially defined in my class locally.
Moreover, when I used the 2022.2.4 version, the 'unicode' was displayed with highlighted way as same as str.
My temporary solution is reinstall the 2022.2.4 version.
The issue is not reproducible for me in 2023.1 when I select Python 2 interpreter.
Could you please show a screenshot of your interpreter settings (https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html) ?
I found the existing project in my system that is based on Python 2 interpreter is reproducible every time. However, when I create a new py2 project after I upgrade to 2023.1, everything is work fine.
Here is new project interpreter settings
Here is old project interpreter settings
I resolve this issue by myself, just need reselect the interpreter and the py2 syntax highlighted feature will work again