Pycharm doesn't recognize builtins for me.
Answered
Hi! I've recently downloaded pycharm and setup it to work with GAE. I like the IDE very much. But there is one annoyance - pycharm doesn't recognize builtins like str(), float(), dict() etc. It highlights builtins with "unresolved reference 'unicode'. more... ctrl+F1"
Do I setup pycharm incorrently or what is the problem?
Please sign in to leave a comment.
Hello Maxim,
Which OS and Python version are you using?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ubuntu 10.04
Python2.5
There is also one more strange thing: debug console always shows following when staring dev_appserver:
/usr/local/bin/python2.5 /home/maxim/projects/product_cart/dev_appserver.py .
i.e. it seems it looks for an application in the current directory (note dot at the end of ine) no matter whether the working directory is specified in settings or not.
And even more strange: it always runs 'new_project_template' app, which is bundled with GAE sdk by default and I don't know the way I can change this... As I mentioned changing working directory doesn't help as pycharm ignores this setting.
So is there any chance I will receive feedback on my issues?
I'm seeing this issue on Windows Vista as well. Is there a way to force the index to rebuild? Deleting and then adding back the python interpreters didn't seem to help (Settings->Python Interpreter). Any suggests would be greatly welcome.
Hello Anthony,
The "Reload" button in Settings | Python Interpreters regenerates the skeletons
for binary modules, including builtins. Please try pressing it.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
That worked perfectly, str() is now recognized, thank you very much. As an aside, I originally had two python interpretters setup and deleted one before running the "Reload." Not sure if that was part of the issue or not, but it's probably worth noting if anyone else is working through the issue in the future.
Kind Regards,
Anthony
How do you reload the builtins with the Python plugin for IntelliJ IDEA Ultimate?
Remove the Python SDK and add it back.
I hope this can be helpful to others with the same problem.
Hello
I'm facing the same issue on Ubuntu 14.04
Recently the editor stopped recognizing python builtin functions, exceptions, etc. I'm not sure if it was something I did but I don't think so. I had opened another thread (https://intellij-support.jetbrains.com/hc/en-us/community/posts/206795849-inspection-stopped-recognizing-python-builtins) but the issue seems to be exactly the same.
I'm using Pycharm Professional 2016.1.4 on Ubuntu 14.04 and it was working just fine three weeks ago.
I also have the problem with bulitins not being recognized by Inspections. I use PyCharm 2016.3.3 and use conda to create environments. With python 2 environments everything works fine. But with python 3 environments I have to start PyCharm with sudo for builtins to be recognized. Also, in Preferences -> Project Interpreter no packages are listed for python 3 environments unless I start PyCharm with sudo.
Sounds like a bug to me, but could it be that I configured something wrong?
I was also experiencing this issue, and then discovered that another member of my team had committed their .idea folder, which when I pulled from the repository over-wrote my local project configuration which then caused this problem (among other mysterious issues). I mention in case others run into the same thing!
Hi! I am sorry for the inconvenience. Could you please open a ticket in our tracker https://youtrack.jetbrains.com/issues and attach idea.log there? Thank you!
I edited my comment - found the source of the problem, wasn't an issue with PyCharm!
Thank you, Hunter Elliott!
Elliot, thank you for your follow up - I had the very same problem and thanks to your comment it was solved at once.
Hey, I just resolve the problem in jet IDEA.
Open `Project Structure` panel and check `project setting`, the project SDK should be Python SDK. Then Python source code will be index for the project and we will code with build-in functions.