thomas-villagers / domoticz-yamaha

Python plugin for Domoticz to control Yamaha AV Receivers (Aventage Series) via TCP/IP
GNU General Public License v3.0
17 stars 11 forks source link

'onMessage' failed 'TypeError':'onMessage() takes 2 positional arguments but 4 were given'. #15

Closed pipiche38 closed 6 years ago

pipiche38 commented 6 years ago

I have move now from Synology to a Raspberry Pi , running Domoticz V3.8153 (c)2012-2017 GizMoCuz

In addition of not having the new icons, I'm getting those error message.

Apr 23 07:58:47 pi3.localdomain domoticz[3986]: 2018-04-23 07:58:47.311 Error: (Yamaha) 'onMessage' failed 'TypeError':'onMessage() takes 2 positional arguments but 4 were given'. Apr 23 07:58:47 pi3.localdomain domoticz[3986]: 2018-04-23 07:58:47.311 Error: (Yamaha) 'onMessage' failed 'TypeError':'onMessage() takes 2 positional arguments but 4 were given'. Apr 23 07:58:56 pi3.localdomain domoticz[3986]: 2018-04-23 07:58:56.727 Error: (Yamaha) 'onMessage' failed 'TypeError':'onMessage() takes 2 positional arguments but 4 were given'.

z1mEk commented 6 years ago

I have same problem in Raspberry - I must added 2 parameters (status, extra) to onMessage function. What it depends on?

z1mEk commented 6 years ago

Can used optional arguments... status, extra ?

thomas-villagers commented 6 years ago

Hi! The Domoticz Guys constantly changed the Python API which causes some confusion ... I guess all of us are using the beta Version of Domiticz. Maybe you should also switch from stable to beta -- but PLEASE make a backup!

z1mEk commented 6 years ago

We officially assume that domoticz-yamaha is for the Beta version? Maybe let's write it in README?

zaraki673 commented 6 years ago

When we wrote it you don't read it ....

let's see on my plugin, i wrote : Domoticz version 3.87xx or greater.

but you ask for the same error ....

;)

2018-04-23 13:48 GMT+02:00 Gabriel notifications@github.com:

We officially assume that domoticz-yamaha is for the Beta version? Maybe let's write it in README?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thomas-villagers/domoticz-yamaha/issues/15#issuecomment-383547525, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGF7CwTYSRWuI2uIvU5MrrAzyQZwsr1ks5trb-AgaJpZM4TfSXh .

z1mEk commented 6 years ago

I understand it but I am wondering how to help users who want to use the stable version.

thomas-villagers commented 6 years ago

I added a note in the readme to make clear that Domoticz beta is needed. It should not be too hard to modify onCommand etc. to accept the "appropriate" parameters for the stable branch. Maybe someone can figure this out?

pipiche38 commented 6 years ago

Will be going to beta. Currently recompiling it ;-)

pipiche38 commented 6 years ago

I do confirm that moving to Beta solved the issue.