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?

18 comments

Hello Maxim,

Which OS and Python version are you using?

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?

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

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.

0

So is there any chance I will receive feedback on my issues?

0

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.

0

Hello Anthony,

I'm seeing this issue on Windows Vista as well.  Is there a way to

force the index to rebuild?

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!"

0

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

0

How do you reload the builtins with the Python plugin for IntelliJ IDEA Ultimate?

0

Remove the Python SDK and add it back.

0
I'm using PyCharm with iron python on win7 x64. I installed PyCharm in the default directory using the administrator account, and use a standard user account to run it. I too had the same problem where none of the built-ins could be recognized. After trying every solution I could find, I finally realized that standard users don't have write access to the program files folder. Even after setting the permissions (and ownership) for the PyCharm folder and subfolders before removing and adding the SDK, PyCharm still couldn't recognize built-ins (it should). But after reinstalling PyCharm in a different location and setting file and folder permissions everything finally started working.

I hope this can be helpful to others with the same problem.
0
PyCharm doesn't write anything to the program files folder after the installation, so it's unlikely that it was the reason for the problem you've encountered.
0

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.

 

0

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?

0

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!

0

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!

0

I edited my comment - found the source of the problem, wasn't an issue with PyCharm!

0

Elliot, thank you for your follow up - I had the very same problem and thanks to your comment it was solved at once.

0

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.

0

Please sign in to leave a comment.