Just installed pychar, try to feel very good, I think this can calm down to experiment flash project. As a result, I typed the code according to the tutorial. Pychar always prompted me with “unresolved reference” in red. I was very depressed. It was clear that the code could run correctly. How could this kind of error occur
Red error prompt looked really upset, so I went to Baidu online for a circle, but I didn’t find a solution. Later, I saw someone encounter the same problem on stackoverflow, and successfully solved the problem according to the given method
In fact, it’s very simple. Right click on the directory, select mark directory as sources root, and add your project directory to sources root
Then, in the settings, check add source roots to pythonpath to add sources root to pythonpath
After the change of apply, there is no error prompt. Look
PS: when you use a template, you will also be prompted that you can’t find the template file. In fact, the code can run correctly. That’s why you set it in pychar. Here, you can also find the option of adding directory as template in the settings, and you can also set it to jinja2
Reference: unresolved reference issue in pycharm
Similar Posts:
- Pychorm prompts the unresolved reference import module to report an error
- Import pandas encountered no module named pandas in pychar
- Pycharm install python packaging tools Error: AttributeError: ‘_NamespacePath’ object has no a…
- Pychar error report solution: error:please select A valid Python interpreter and some basic settings
- No r interpreter defined appears under pychar
- Error LNK2019: unresolved external symbol WinMain (vs2019)
- The problem of: modulenotfoundererror: no module named ‘pyqt5’ appears in pychar using pyqt5
- 0x8007000d error resolution when installing windows10 with UltraISO
- Pychar can’t install the third-party library, the solution of error code non zero exit code (1)
- After installing BS4 in Python, pychar still reports module not found error: no module named ‘BS4’