Page 1 of 1

Error When Trying to Add a Lock Code

PostPosted: Mon May 23, 2022 6:40 am
by eric
This has worked up to the latest release, I believe. But now, with 3.0,64 when I try to add a lock code to my Yale z-wave locks I get this in the log:

Z-Wave Lock Manager Error Error in plugin execution ExecuteAction:

File "plugin.py", line 181, in setUserPin
File "plugin.py", line 828, in setPin
File "plugin.py", line 234, in getPinStr
type: name 'xrange' is not defined


Any ideas?

Thanks.

Re: Error When Trying to Add a Lock Code

PostPosted: Mon May 23, 2022 9:26 am
by howartp
That's very likely; xrange is a line of code another user taught me years ago and i've never touched it for fear of breaking it.

It's in the same sort of area of bytes vs strings that Py3 has broken so it's likely related.

I'll do some diggering.

Peter

Re: Error When Trying to Add a Lock Code

PostPosted: Sat May 28, 2022 2:25 am
by howartp
Fixed in v3.0.65

Re: Error When Trying to Add a Lock Code

PostPosted: Sat May 28, 2022 6:56 am
by CliveS
Peter, just updated to 3.0.65 and getting

Code: Select all
28 May 2022 at 13:48:28
   Hubitat Bridge                  received "T Qashqai Power Switch" power update to 28 Watts
   Stopping plugin Z-Wave Lock Manager (pid 32838)
   Stopped plugin Z-Wave Lock Manager
   Upgrading plugin Z-Wave Lock Manager to newer version 3.0.65 (previous version moved to trash)
   Loading plugin "Z-Wave Lock Manager 3.0.65" using API v3.0
   Starting plugin "Z-Wave Lock Manager 3.0.65" (pid 21149)
   Z-Wave Lock Manager Error       Error in plugin execution InitializeMain:

type: ('invalid syntax', ('plugin.py', 236, 66, '\t\t\treturn [int(inPin[i:i+2],16) for i in range(0,len(inPin),3)]\t\trange in py2 is now list(range()) in py3\n', 236, 71))

   Stopping plugin "Z-Wave Lock Manager 3.0.65" (pid 21149)
   Stopped plugin "Z-Wave Lock Manager 3.0.65"

28 May 2022 at 13:49:10
   Reloading plugin "Z-Wave Lock Manager 3.0.65" using API v3.0
   Starting plugin "Z-Wave Lock Manager 3.0.65" (pid 21195)
   Z-Wave Lock Manager Error       Error in plugin execution InitializeMain:

type: ('invalid syntax', ('plugin.py', 236, 66, '\t\t\treturn [int(inPin[i:i+2],16) for i in range(0,len(inPin),3)]\t\trange in py2 is now list(range()) in py3\n', 236, 71))

   Stopping plugin "Z-Wave Lock Manager 3.0.65" (pid 21195)
   Stopped plugin "Z-Wave Lock Manager 3.0.65"

Re: Error When Trying to Add a Lock Code

PostPosted: Sat May 28, 2022 12:54 pm
by howartp
Apologies, I think i've hit a spurious keyboard key in the code between testing and uploading.

3.0.66 should sort it.

Re: Error When Trying to Add a Lock Code

PostPosted: Sat May 28, 2022 3:26 pm
by CliveS
howartp wrote:
Apologies, I think i've hit a spurious keyboard key in the code between testing and uploading.

3.0.66 should sort it.


It has, thanks, all fine now.