以下是错误。它在1天前工作正常。但当我试图再次运行它时,它会给我以下错误。
Traceback (most recent call last):
File "C:/nor-devops/projects/nor_7sm_denaliml/denali/back_testing_agent_python_consumer.py", line 22, in <module>
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
File "C:\Anaconda\lib\site-packages\pika\adapters\blocking_connection.py", line 339, in __init__
self._process_io_for_connection_setup()
File "C:\Anaconda\lib\site-packages\pika\adapters\blocking_connection.py", line 374, in _process_io_for_connection_setup
self._open_error_result.is_ready)
File "C:\Anaconda\lib\site-packages\pika\adapters\blocking_connection.py", line 395, in _flush_output
raise exceptions.ConnectionClosed()
pika.exceptions.ConnectionClosed
代码如下:
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='init_filtering')
channel.basic_consume(callback,
queue='init_filtering',
no_ack=True)
print(' [*] Waiting for messages. To exit press CTRL+C')
channel.start_consuming()
我的RabbitMQ正在运行并且我的项目在本地计算机上使用。鼠兔版是0.10.0