Question

I'm using python v2.7.3 - Installed python-rq via easy_install. While trying to create RQ queue with steps given at http://python-rq.org/ . it fails with message like

>>> from redis import Redis
>>> from rq import Queue
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rq.py", line 11, in <module>
    q = Queue(connection=Redis())
TypeError: 'module' object is not callable
>>> 
>>> q = Queue(connection=Redis())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Queue' is not defined
>>> 

Whats the issue here and how to fix this?

Was it helpful?

Solution

Reposting comment as answer:

Thanks for the answer. Sorry stupid me! .sometime back I created file named rq.py and its creating problem. Deleted that file.solved the issue

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top