example-rabbitmq
example-rabbitmq copied to clipboard
Following the tutorial, running into error: 'type_of_change' is not defined
Following this guide: https://rethinkdb.com/docs/rabbitmq/python/
I cannot run this part:
for change in table_changes.run(rethink_conn):
routing_key = 'mytable.' + type_of_change(change)
channel.basic_publish(exchange, routing_key, json.dumps(change))
I get this error:
Traceback (most recent call last):
File "app.py", line 51, in <module>
routing_key = 'mytable.' + type_of_change(change)
NameError: name 'type_of_change' is not defined
I was able to continue the tutorial, by not using the 'type_of_change' function.
Can someone shed some light on my experience?