16
votes

I just installed the latest version of PyCharm (4.5).

Now I am experiencing unresolved reference errors. On the top of my code I have:

from datetime import datetime

OS is Ubuntu 15.04. Already did the Invalidate Cache/Restart several times. No difference. The Project interpreter of my project is set to Python 2.7.6. Already reloaded the Interperter Paths.

Code works fine, it's just the IDE that produces an annoying error and no more autocomplete.

2
have you tried to rebuild the framework skeletons? you could also try to remove the .idea folder and re-open a project to see if it helps - Hedde van der Heide
Hedde, I rebuilt the skeletons and also removed the .idea folder. Same result. - stijnh92
I can't seem to reproduce it, perhaps try to create a virtualenv and point your project to it, repeat the cache steps and see if it changes anything, it must have something todo with the interpreter settings imo - Hedde van der Heide
it works fine for me in 14.04 i know for sure ... but i have the paid version (doubt that makes a difference here) - Joran Beasley
There is reported bug in jetbrains tracker: youtrack.jetbrains.com/issue/PY-15460 - azurkin

2 Answers

9
votes

As mentioned here try to delete the content of the skeleton folder. It reside inside of the settingsfolder (~/.PyCharmxxxx.xx/system/python_stubs) Removing/adding the python environment was not necessary for me. Simply restart PyCharm after removing the content (or the whole python_stubs folder)

This does the trick for me and now it works like a (py)charm again.

4
votes