example-rabbitmq icon indicating copy to clipboard operation
example-rabbitmq copied to clipboard

Following the tutorial, running into error: 'type_of_change' is not defined

Open troldmand opened this issue 4 years ago • 0 comments

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?

troldmand avatar Oct 19 '20 20:10 troldmand