Domanda

I'm trying to run some python code that uses pika and tornado. I installed both, but get the error

File "tornado_conn.py", line 90, in <module>
   pika.log.setup(color=True)
AttributeError: 'module' object has no attribute 'log'

Both packages are installed in /usr/local/lib/python2.7/dist-packages/

This is my first time playing with python, so I really don't know why it can't find it. Everything seems right in the code:

# Helper class PikaClient
application.pika = PikaClient()

# Set our pika.log options
pika.log.setup(color=True)
# Start the HTTP Server
pika.log.info("Starting Tornado HTTPServer on port %i" % PORT)
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(PORT)
È stato utile?

Soluzione

Looking at the latest Pika release, it looks like they removed the log module some time ago.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top