Page 1 of 1

Init error

PostPosted: Fri Apr 19, 2019 1:20 pm
by rhanson
Noticed this after upgrading to 7.3

Code: Select all
   Starting plugin "Z-Wave Watcher 1.0.7" (pid 63217)
   Z-Wave Watcher Error            Error in plugin execution InitializeMain:

Traceback (most recent call last):
SyntaxError: ('invalid syntax', ('plugin.py', 102, 33, '\t\telseif (int(bytes[5],16)) == 2:\n'))

   Stopping plugin "Z-Wave Watcher 1.0.7" (pid 63217)

Re: Init error

PostPosted: Fri Apr 19, 2019 2:02 pm
by CliveS
Also got the same, it seems that somehow "elif" has changed to "elseif" and as at least 3 of us have seen this I am glad it was not just me.

Easiest is to change line 102 to "elif" but also you can disable and delete the plugin, stop and start Indigo and download the file again from the Plugin store.

The question is WHY it happened ?

Re: Init error

PostPosted: Fri Apr 19, 2019 2:43 pm
by howartp
Interesting.

I didn't have time during the private beta to check my plugins.

I'll check it now before/after I upgrade to 7.3, and I'll ask the other plugin devs if they had to tweak any of theirs.

Peter

Re: Init error

PostPosted: Fri Apr 19, 2019 2:51 pm
by DaveL17
Not suggesting the errors are related, but something looks fishy with the traceback. See this thread, as well:

https://forums.indigodomo.com/viewtopic.php?f=70&t=22337

Re: Init error

PostPosted: Fri Apr 19, 2019 2:55 pm
by CliveS
Peter, nothing wrong with your code, it works 100% as I have downloaded from the plugin store and it works fine now.
7.2.0 worked fine
7.3.0 upgrade and it fails on line 102 as "something" changes elif to elseif!
7.3.0 with new download works fine

One thing I did not try was change line 102 and resave as I was not sure if it should have been
Code: Select all
else:
    if .....

or
Code: Select all
elif ........

Re: Init error

PostPosted: Fri Apr 19, 2019 2:58 pm
by howartp
I'm on 7.2 and just updated my own plugin (!) from 1.0.4 to 1.0.7

THAT is throwing the elseif() syntax error even before I upgrade to 7.3

However, the original code (my local copy, the copy on github and thus the copy you've all been running for months) has "elseif" in it, which is not valid python syntax.

All my other plugins use elif() so why I put elseif() there I don't know.

I'm updating the github copy right now, with elif() as it should be.

Peter

Re: Init error

PostPosted: Fri Apr 19, 2019 3:10 pm
by howartp
Ok if you go Indigo 7.3 Menu > Check for updates, then go Plugins > ZWave Watcher > Download update, you should get 1.0.8

Peter