ns-flash icon indicating copy to clipboard operation
ns-flash copied to clipboard

Syntax error to run nxpanel

Open pajakh opened this issue 3 years ago • 3 comments

When I tried run nxpanel I got syntax error: 00:00:00.003 HDW: ESP32-D0WD-V3 00:00:00.147 UFS: FlashFS mounted with 272 kB free 00:00:00.242 CFG: Loaded from File, Count 14 00:00:00.257 QPC: Count 1 00:00:00.608 BRY: Berry initialized, RAM used=3935 bytes 00:00:00.641 Project tasmota - Tasmota Version 12.1.1.4(nspanel)-2_0_5(2022-10-08T15:19:12) 00:00:01.374 BRY: failed to load '/nxpanel.be' (syntax_error - /nxpanel.be:353: strict: redefinition of builtin 'str') 00:00:01.376 BRY: Successfully loaded 'autoexec.be' 00:00:02.421 WIF: Connecting to AP1 xxxxxxx in mode 11n as tasmota-C8359C-5532... 00:00:04.449 WIF: Connected

What I do wrong?

pajakh avatar Oct 08 '22 22:10 pajakh

I comment lines below and nxpanel run normally but without auto update active. For now is ok, but how to resolve this?

def version_number(str)
       import string
       var i1 = string.find(str,".",0)
       var i2 = string.find(str,".",i1+1)
       var num = int(str[0..i1-1])*10000+int(str[i1+1..i2-1])*100+int(str[i2+1..])
       return num
   end

pajaczkowskim avatar Oct 09 '22 13:10 pajaczkowskim

I have the same issue, commented out the function as suggested by @pajaczkowskim and was able to proceed. But I wonder how to solve it?

Ladida1 avatar Nov 02 '22 19:11 Ladida1

You need to replace every "str" argument to something else, like in this example :

def version_number(vstr)
     import string
     var i1 = string.find(vstr,".",0)
     var i2 = string.find(vstr,".",i1+1)
     var num = int(vstr[0..i1-1])*10000+int(vstr[i1+1..i2-1])*100+int(vstr[i2+1..])
     return num
end

Memphis017 avatar Nov 11 '22 01:11 Memphis017

I've fixed this. 1.1.4. I think its something that has changed in the berry built into later version of Tasmota. It's appears to now reserved variable, and wasn't before.

peepshow-21 avatar Nov 13 '22 20:11 peepshow-21

Fixed.

If you use NxPanel firmware. Update that too, to keep in sync.

From Tasmota console just type; AutoFlash

peepshow-21 avatar Nov 14 '22 09:11 peepshow-21

Thanks for doing a fix. At first when I used the new version, I got an error message at bootup "Requires Berry 1.1.3". I simply changed line 2 back to static VERSION = "1.1.3 and then it booted without error.

Ladida1 avatar Nov 16 '22 18:11 Ladida1

There is a new version of the NxPanel to match the 1.1.4 berry script.

If you type "AutoFlash" in the console, it should update it for you so it's in sync

On Wed, 16 Nov 2022 at 18:37, Ladida1 @.***> wrote:

Thanks for doing a fix. At first when I used the new version, I got an error message at bootup "Requires Berry 1.1.3". I simply changed line 2 back to static VERSION = "1.1.3 and then it booted without error.

— Reply to this email directly, view it on GitHub https://github.com/peepshow-21/ns-flash/issues/59#issuecomment-1317496188, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBSYTGIXOD2LZN57DOUOKDWIUSUZANCNFSM6AAAAAARANO62Q . You are receiving this because you modified the open/close state.Message ID: @.***>

peepshow-21 avatar Nov 16 '22 18:11 peepshow-21

I tried the AutoFlash command and also tried to download nxpanel.be again, but it comes back to the beeping and "Requires Berry 1.1.3".

Need to logoff now, but let me know if you want me to test anything else, and I will do it next time.

Ladida1 avatar Nov 16 '22 20:11 Ladida1

Also, if you go into the config page by swipe down on home screen.

make sure you have 'testing' versions turned on. or it will only check for stable versions on AutoFlash

let me know if that was it?

On Wed, 16 Nov 2022 at 20:00, Ladida1 @.***> wrote:

I tried the AutoFlash command and also tried to download nxpanel.be again, but it comes back to the beeping and "Requires Berry 1.1.3".

Need to logoff now, but let me know if you want me to test anything else, and I will do it next time.

— Reply to this email directly, view it on GitHub https://github.com/peepshow-21/ns-flash/issues/59#issuecomment-1317596535, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBSYTGT6U6IZ32I3YREEHLWIU4OVANCNFSM6AAAAAARANO62Q . You are receiving this because you modified the open/close state.Message ID: @.***>

peepshow-21 avatar Nov 16 '22 21:11 peepshow-21

Sorry for the delayed answer, life got in the way.

The "Test" checkbox indeed did the trick, now AutoFlash worked and updated to the latest version.

Ladida1 avatar Dec 06 '22 18:12 Ladida1