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

m4jesticsun
  • 1,799
  • 3
  • 12
  • 12

1 Answers1

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.

McGrady
  • 10,869
  • 13
  • 47
  • 69