Open vinpav opened 4 years ago
If you can provide the stack trace. Thanks for the synapse example, it's a good start for us.
Here's the stack trace :
Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1-py2.7.egg/kalliope/signals/mqtt_subscriber/mqtt_subscriber.py", line 33, in run list_broker_to_instantiate = self.get_list_broker_to_instantiate(self.list_synapses_with_mqtt) File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1-py2.7.egg/kalliope/signals/mqtt_subscriber/mqtt_subscriber.py", line 65, in get_list_broker_to_instantiate if not any(x.broker_ip == signal.parameters["broker_ip"] for x in returned_list_of_broker): File "/usr/local/lib/python2.7/dist-packages/kalliope-0.5.1-py2.7.egg/kalliope/signals/mqtt_subscriber/mqtt_subscriber.py", line 65, in <genexpr> if not any(x.broker_ip == signal.parameters["broker_ip"] for x in returned_list_of_broker): TypeError: string indices must be integers, not str
I'm not sure but it seems that the synapse crashes only when there's an "order" signal after the "mqtt_subscriber" signal. The correct example to reproduce the error might be :
- name: "hello"
signals:
- mqtt_subscriber:
broker_ip: "192.168.xx.xx"
topic: "hello-topic"
- order: "hello"
neurons:
- say:
message: "Hey there !"
Thanks. I'll take a look.
Hi ! First of all notice that I've been using Kalliope for more than a year now and my version isn't up to date (must be the 5.1 release).
I recently tested the "mqtt_subscriber" signal and it looks like this signal is not working when used with an "order" signal in the same synapse.
For example :
Works as intended.
Whereas :
Raises a python error (I don't have the stack trace unfortunately) when the mqtt_subscriber signal is triggered.
Did you experienced this error already ? Is this a bug ?
Thanks !