Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amqp_channel is null when invoked inside send_amqp_msg function #1

Open
mbrudnoy opened this issue Aug 8, 2017 · 0 comments
Open

Comments

@mbrudnoy
Copy link

mbrudnoy commented Aug 8, 2017

After using the keywords 'init amqp connection' and 'set amqp destination' correctly, the keyword 'send amqp message' fails with the following error:

AttributeError: 'NoneType' object has no attribute 'basic_publish'.

Running with DEBUG log level, I can see the following Trace as well.

Traceback (most recent call last):
File "/Users/mbrudnoy/Projects/PythonVirtualEnvs/robot/lib/python2.7/site-packages/AMQPLib/AMQPMsg.py", line 92, in send_amqp_msg
self.amqp_channel.basic_publish(exchange=amqp_exchange,

After playing around with the code, I noticed that even though amqp_channel is set in the init_amqp_connection function, it appears to lose the reference later on.

The function send_amqp_message works if I replace self.amqp_channel.basic_publish(...) with self.amqp_connection.channel().basic_pubish(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant