Marcin Olchowka
unread,Oct 21, 2020, 10:16:50 AM10/21/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rabbitmq-users
Hi everyone,
I have a problem with connection to RabbitMQ using pika.SelectConnection adapter. I am using Pika 1.1.0 and Python 3.7.9.
Below snapshot of my code showing how I am creating connection.
import pika
def on_done():
connect.channel()
print("Open Callback")
if __name__ == '__main__':
account = "user"
password = "password"
server = "172.17.0.5"
credentials = pika.PlainCredentials(account, password)
parameters = pika.ConnectionParameters(host=server, port=15672, credentials=credentials, socket_timeout=10)
connect = pika.SelectConnection(parameters, on_open_callback=on_done)
connect.ioloop.start()
RabbitMQ is running, I have checked connection using pika.BlockingConnection adapter.
What is strange, my IDE (Pyharm) is highliting start() function as "Unresolved attribute reference 'start' for class 'object'". When I run this code, nothing error is occured. On admin webpage I don't see that connection is opened.
Has somebody meet similar problem?
Thank you for help!!