There is a problem: the related classes cannot be referenced, but these classes are indeed in the project
Analysis reason: import failed because the path does not correspond. Pycharm defaults to the source directory as the root directory of the project
Solution:
Search the corresponding item searchtest and select “sources”; Finally, be sure to “apply”
Set the folder where the package is placed as source, so that the module class of import can be found through these source folders as the root path, that is, find the imported things in these source folders
Or
Read More:
- [Solved] TypeError: xx takes 1 positional argument but 4 were given
- PyCharm: How to Solve Tensorflow_datasets Import Error
- [ncclUnhandledCudaError] unhandled cuda error, NCCL version xx.x.x
- [Solved] pycharm Import New Project Error: cannot set up a python sdk
- [Solved] Python Relative Reference Error: ImportError: attempted relative import with no known parent package
- Python Import Error: SystemError: Parent module ‘‘ not loaded, cannot perform relative import
- Change the Python installation path in Pycharm
- [Solved] OpenCV Import Error: ImportError: numpy.core.multiarray failed to import
- Keras import package error: importerror: cannot import name ‘get_ config‘
- [Solved] From pip._internal import cmdoptions ImportError: cannot import name SourceDistribution
- [How to Solve] PyCharm Error: Non-zero exit code (2)
- Raspberry pie import opencv error: ImportError: numpy.core.multiarray failed to import
- [Solved] Pycharm Use pip to install package error: no such option –build-dir
- [Solved] Pycharm error: attributeerror: ‘Htmlparser’ object has no attribute ‘unescape’
- [Solved] Python Project Import Module Error: ModuleNotFoundError
- [Solved] Windows10 Pycharm Use Virtual Environment Error: Cannot set up a python SDK
- Python 3 uses the relative path import module
- [Solved] PyCharm pytest-html Install Error: Try to run this command from the system terminal. Make sure that you use
- Pycharm WebSocket Error: Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- [Solved] PyCharm Error: Cannot open Local Terminal Failed to start [powershell.exe] in C:\Users\…….