Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm warns for unresolved reference builtin datetime module

Tags:

python

pycharm

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.

like image 245
stijnh92 Avatar asked May 18 '15 20:05

stijnh92


2 Answers

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.

like image 172
user762353 Avatar answered Nov 15 '22 19:11

user762353


That's a known, already reported at https://youtrack.jetbrains.com/issue/PY-15460

like image 29
sorin Avatar answered Nov 15 '22 20:11

sorin