'module' object has no attribute 'Queue'
See original GitHub issueTraceback (most recent call last):
File "spider_agent/conf.py", line 11, in <module>
from kazoo.client import KazooClient
File "/Library/Python/2.7/site-packages/kazoo/client.py", line 21, in <module>
from kazoo.handlers.threading import SequentialThreadingHandler
File "/Library/Python/2.7/site-packages/kazoo/handlers/threading.py", line 146, in <module>
class SequentialThreadingHandler(object):
File "/Library/Python/2.7/site-packages/kazoo/handlers/threading.py", line 177, in SequentialThreadingHandler
queue_impl = Queue.Queue
AttributeError: 'module' object has no attribute 'Queue'
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
AttributeError 'module' has no attribute 'Queue" - Stack Overflow
Queue() AttributeError: 'module' object has no attribute 'Queue'. I am using the code in the link Threading in python using queue.
Read more >AttributeError: module 'queue' has no attribute 'queue'? - Reddit
I can set up a virtual environment, but why?
Read more >AttributeError: module 'queue' has no attribute 'Queue' - Steemit
When a module named spam is imported, the interpreter first searches for a built-in module with that name. If not found, it then...
Read more >Python – AttributeError 'module' has no attribute 'Queue
Queue() AttributeError: 'module' object has no attribute 'Queue'. I am using the code in the link Threading in python using queue.
Read more >FreeCodeCamp/python - Gitter
```from Queue import PriorityQueue ... but it failed in my code because of "AttributeError: 'Queue' object has no attribute 'queue'".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This sounds like you have another module named Queue somewhere in your Python path, so the wrong one gets picked up and not the one from the standard library.
You can start the interpreter, import Queue and see where it comes from, something like:
Or import sys, and expect sys.path.
Make sure to use the interpreter you also use to start the actual program with. There might be a virtualenv or other isolation bits involved.
@hannosch Oh god you are right, i file name was queue.py, i feel so stupid