4

I have installed the module "six", and it can be found by the PyCharm Interpreter.

PyCharm Interpreter:

enter image description here

However, PyCharm reports that it cannot resolve reference 'queue' which should be imported from six.

Unresolved reference queue:

enter image description here

Pramod Gharu
  • 1,105
  • 3
  • 9
  • 18
user3272089
  • 51
  • 1
  • 5

2 Answers2

1

Your code is fine. This is because moved attributes and modules in six are loaded lazily, therefore PyCharm cannot resolve the reference.

See source code for class Module_six_moves_urllib_parse in six.py.

  • This is still a bug in PyCharm. Reported as [youtrack PY-24207](https://youtrack.jetbrains.com/issue/PY-24207). Cast your vote today. – Bob Stein May 18 '18 at 16:14
0

I had the same problem, if you have six imported you can import queue as follows:

import six
import queue

It just worked for me, hope it works for you as well.