Please or Register to create posts and topics.

[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.