Linked Questions
47 questions linked to/from Unresolved reference issue in PyCharm
4 votes
2 answers
9k views
ModuleNotFoundError even with __init__.py [duplicate]
I have a project with the following structure: . └── project ├── assignment01 | ├── __init__.py | └── old_file.py | ├── assignment02 | ├── __init__.py ...
0 votes
2 answers
2k views
ModuleNotFoundError error with installed package in PyCharm [duplicate]
I'm trying to create my first package using the format from the python tutorial and am getting ModuleNotFoundError when trying to run unittests from the tests subfolder in PyCharm, but can run the ...
0 votes
1 answer
187 views
How can I import my personnal modules in python? [duplicate]
I have a problem with my python modules for a project. Here's my tree for my project : Documents/Projects/projet/ ├── code │ ├── datas │ │ ├── Lexique383 │ │ │ └── Lexique383.tsv │ │ └─...
1 vote
0 answers
123 views
How to set PyCharm project structure to avoid unresolved reference error? [duplicate]
I have specific project structure - src - common/ - constants/ - __init__.py - database.py - user - create/ - main.py - constants/ - app_constants.py -...
1 vote
0 answers
115 views
Why do I get unresolved reference while the included file is there? [duplicate]
Currently I'm working with multiple people on a python project. We are working with Github. I connected Git with Pycharm. There is a main file and in that main file there are functions called from ...
0 votes
1 answer
115 views
Unresolved reference 'addresses' in Pycharm Community Edition [duplicate]
My Project Structure My Pycharm Screenshot Hello, if you can see the attached screenshot of my Django project in Pycharm, you'll see that all the imports from other app folders have a red ...
0 votes
1 answer
75 views
Import python package with relative path and calm down the IDE [duplicate]
Consider I have a project with the following structure: A/a1.py A/B/b1.py A/B/C/c1.py D/E/F/f1.py main.py I need to do the following imports main.py needs to import a1 a1 needs to import b1 b1 needs ...
0 votes
1 answer
57 views
Problem with importing python classes from different folders [duplicate]
This is how my project looks: src/ data_readers/ - __init__.py - d2d_releases_reader.py main/ d2d_interactions/ - __init__.py - ...
0 votes
0 answers
48 views
Problems executing files through venv python local imports cause errors [duplicate]
Im having some issues with virtual enviroments, i have a pycharm project where i want to launch it from my terminal, however when launching the project it seems like my internal modules are not found. ...
0 votes
0 answers
49 views
How to get the Packages I am Using in Jupyter into PyCharm [duplicate]
I have recently started using PyCharm to write my python code. In the past, I have used Jupyter Notebook more. I thought that the packages I have installed in Jupyter would work in PyCharm, but this ...
0 votes
0 answers
44 views
PyCharm doesn't recognise imported module from sibling to project root folder [duplicate]
I have a folder structure as follows: python_projects | |- common_tools | |- __init__.py | |- some_functions.py | |- some_project |- main.py I currently import some_functions.py into main.py as ...
0 votes
0 answers
43 views
How to make python import be recognised with path [duplicate]
I have a project that I imported. It has structure of: my_package | _ my_package | _ operators |_ myoperator.py (that contains MyOperator class) imports in code of ...
0 votes
0 answers
29 views
How to use a .py file as a module in PyCharm? [duplicate]
I am copying analysis files to my local PyCharm to reproduce parts of it. I have a scsim.py file which runs without errors. But when I call it from another .py file as from scsim import scsim, it says ...
224 votes
14 answers
309k views
PyCharm error: 'No Module' when trying to import own module (python script)
I have written a module (a file my_mod.py file residing in the folder my_module). Currently, I am working in the file cool_script.py that resides in the folder cur_proj. I have opened the folder in ...
15 votes
7 answers
27k views
PyCharm unresolved reference when importing class from other file
This problem has been driving me nuts. I am trying to import a class from a file in the same directory. PyCharm is giving me the "Unresolved reference" error. MyClass is defined in file.py. I have ...
21 votes
3 answers
25k views
IntelliJ IDEA says "unresolved reference" on everything (Python, virtual environment)
How can I get IntelliJ IDEA to recognize common Python modules? IntelliJ IDEA is complaining "unresolved reference" on everything despite that I have added my virtual environment as a "Python ...
3 votes
2 answers
42k views
no module named StringIO
I have python 3.6. I want to execute python file named 'operation.py' from another python file named 'run.py'. In operation.py I do from cStringIO import StringIO. PyCharm shows me a warning that ...
8 votes
2 answers
22k views
Pycharm: Marking a folder as 'sources root' is not recursive for subfolders
I've followed pycharm documentation to set up the IDE to resolve imports. However it seems that each folder containing *.py files needs to be explicitly added as 'sources root' in order for the IDE to ...
6 votes
3 answers
14k views
Opening/Attempting to Read a file [duplicate]
I tried to simply read and store the contents of a text file into an array, but: ins = open( "file.txt", "r" ) array = [] for line in ins: array.append( line ) ins.close() It gives me an error ...
4 votes
3 answers
13k views
Pycharm import error with Pyqt4 and Pyqt5
I'm having some troubles with PyQt. I've installed PyQt4 and PyqQt5 through Homebrew, and I planned on using PyQt4 for a particular project I'm working on. However, I have some strange issues getting ...
7 votes
1 answer
8k views
Intellij idea won't recognize import of local class in python 3 [duplicate]
I've got a python3 script, script.py, and in it I want to instantiate a class Foobar which is defined in clazz.py. However, when I try to import, I get: $ python3 script.py ... SystemError: Parent ...
0 votes
1 answer
17k views
Why is python using 3.8.1 and 3.9, then fail to install packages (ERROR: Package pkg requires a different Python: 3.8.1 not in '>=3.9.0')?
I was trying to test the installation of my ultimate-utils library and I get this bizzare error: (meta_learning) brandomiranda~/ultimate-utils ❯ pip install -e . Obtaining file:///Users/brandomiranda/...
2 votes
1 answer
5k views
How to lemmatize spanish words with Pattern?
I would like to lemmatize a bunch of opinions. As I know, nltk cannot lemmatize words in languages different from English. Researching a little, I found pattern, which can lemmatize words in several ...
2 votes
2 answers
3k views
PyCharm unresolved reference for module members
I have a flask app that I'm developing in PyCharm on MacOS. When I try to import the flask current app like this: from flask import current_app as app I get an inspection error: Unresolved reference ...
3 votes
2 answers
5k views
How to handle popup window by using python automation
I am using Selenium Webdriver with Python for automation testing. While login my application I have got popup message for clicking 'OK' button. where i have used from selenium import webdriver def ...
1 vote
2 answers
5k views
Cannot import local module in Python despite trying multiple suggestions
I've read through about ten posts on how to import local modules, and I'm still stumped on why this isn't working. I have an extremely simple module, actor.py, with a single class inside it: class ...
2 votes
1 answer
3k views
ModuleNotFoundError: No module named 'project.user'
If anyone knows how to solve this, please don't hesitate to help. I've tried many hints, but so far this problem still remains. Too frustrating! I just started a little project on Django because I ...
0 votes
1 answer
4k views
Python 3.x import class module not found error
Trying to import a class into my Python code from another .py file I've written and included in the same sub-directory, however I'm receiving the error: ModuleNotFoundError: No module named 'main....
3 votes
1 answer
3k views
How to add "src" to PATH in a PyCharm Project so it doesn't have to appear in all the imports?
My PyCharm project contains folders such as src, data, notebooks etc. Within my notebooks folder, I have a small notebooks.py file which contains: import sys sys.path.append('../src') So within my ...