[SOLVED] – PyCharm: Unresolved reference issue

[SOLVED] – PyCharm: Unresolved reference issue

Unresolved reference issue is one of the most common problems that novice programmers face. The following article describes possible causes and solutions for the issue.

Let’s look on the example below. As you can see there is a snake.py file contains import graphics. The import is underlined in red. When you hover on t he line you can see the message “unresolved reference graphics”.

Cause 1: Missing graphics.py file

First of all ensure that your source directory contains files you want to include.

Cause 2: Invalid project configuration

Ensure that you have marked source directory as “sources” i project settings. Open File->Settings->Project->Project Structure. Select source directory you want to add to sources list and click “Sources” icon on the top.

At the end… May I ask you for something?

If I helped you solve your problem, please share this post. Thanks to this, I will have the opportunity to reach a wider group of readers. Thank You

5 2 votes
Article Rating
Notify of
Inline Feedbacks
View all comments