cannot resolve builtin module or type

code like this:

from collections import deque
import sys

or

args = list(args)

"sys", "deque" and "list" are mark as "unresolved module" or "unresolved reference", althorugh the program can run in pycharm correctly.
How to fix this problem?

system: Mac OS X 10.9.4
pycharm version: 3.4
2 comments
Comment actions Permalink
I'm having the same issue. In my case I'm running the Django tutorial and it shows KeyError as unresolved. Code runs fine.

Code
try:
        selected_choice = p.choice_set.get(pk=request.POST['choice'])
    except (KeyError, Choice.DoesNotExist):
        # Redisplay the poll voting form.
        return render(request, 'polls/detail.html', {
            'poll': p,
            'error_message': "You didn't select a choice.",
        })
prettyPrint();

system: Mac OS X 10.9.3
pycharm: 3.4.1 Build 135.1057

In my instance I'm using a virtualenv created by PyCharm, which has its own Python 2.7.8. All of this seems to be working fine, just PyCharm showing KeyError (and I assume anything not explicitly imported) as unresolved.
0
Comment actions Permalink
Not sure why this worked, but I switched the project interpreter to a virtualenv I had created outside of PyCharm, allowed it to index, noticed the issue was fixed, and then back to my original virtualenv interpreter and seemed to have the built ins indexed.

I tried reproducing the issue but the new virtualenvs I created as a project in PyCharm now seem to have the built ins indexed.
0

Please sign in to leave a comment.