1

Whenever I do str(integer) to cast to string, pycharm would highlight the str part and claim Unresolved Reference 'str'

Why? I thought str is a built in python function that should work universally.

I have Python 3.5 running from Vagrant configured as the interpreter that is setup following this: https://www.jetbrains.com/help/pycharm/2016.1/configuring-remote-interpreters-via-vagrant.html

I tried invalidating cache from Pycharm but it didn't work

2
  • Does the code still work when you run it? Commented Feb 11, 2017 at 0:52
  • yea it works when i run it Commented Feb 11, 2017 at 0:53

1 Answer 1

0
  1. Make sure your project interpreter is right.

    import sys print(sys.version)

  2. Back up and then remove ~/.PyCharm40 folder,it will remove your preferences and then restart Pycharm.

  3. Delete your project's .idea folder and restart Pycharm.

  4. File -> Invalidate Caches/Restart .


If the code works well when you run it,I suppose the second or third plan can fix this issue.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.