moroen / IKEA-Tradfri-plugin

A Python plugin for Domoticz to controll IKEA Gateway
68 stars 23 forks source link

'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''. #57

Closed elxsi closed 5 years ago

elxsi commented 5 years ago

Hi,

I'm receiving the following error in domoticz every few minutes after enabling the tradfri plugin:

2018-11-03 21:06:41.877 Error: (Tradfri) 'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''. 2018-11-03 21:06:41.877 Error: (Tradfri) ----> Line 280 in '/home/domoticz/plugins/IKEA-Tradfri.orig/plugin.py', function onMessage 2018-11-03 21:06:41.877 Error: (Tradfri) ----> Line 190 in '/home/domoticz/plugins/IKEA-Tradfri.orig/plugin.py', function onMessage 2018-11-03 21:06:41.877 Error: (Tradfri) 'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''. 2018-11-03 21:06:41.877 Error: (Tradfri) ----> Line 280 in '/home/domoticz/plugins/IKEA-Tradfri.orig/plugin.py', function onMessage 2018-11-03 21:06:41.877 Error: (Tradfri) ----> Line 190 in '/home/domoticz/plugins/IKEA-Tradfri.orig/plugin.py', function onMessage

Domoticz version is 4.10007, I'm using the latest Tradfri Plugin version.

Thank you!

moroen commented 5 years ago

Are you sure you have the latest version of the plugin?

The error message and line number of the error suggests that it's an older version. In the newest version, the onMessage function is defined on line 196 and the dict object is checked for the presence of the decode-attribute...

Regards, M

elxsi commented 5 years ago

Hi,

sorry, you're right. The problem was, that domoticz didn't restart correctly after using the new plugin version. Please close this issue.

Thanks!