Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error to run nxpanel #59

Closed
pajakh opened this issue Oct 8, 2022 · 10 comments
Closed

Syntax error to run nxpanel #59

pajakh opened this issue Oct 8, 2022 · 10 comments

Comments

@pajakh
Copy link

pajakh commented Oct 8, 2022

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?

@pajaczkowskim
Copy link

pajaczkowskim commented Oct 9, 2022

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

@Ladida1
Copy link

Ladida1 commented Nov 2, 2022

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?

@Memphis017
Copy link

Memphis017 commented Nov 11, 2022

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

@peepshow-21
Copy link
Owner

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
Copy link
Owner

Fixed.

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

From Tasmota console just type;
AutoFlash

@Ladida1
Copy link

Ladida1 commented Nov 16, 2022

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.

@peepshow-21
Copy link
Owner

peepshow-21 commented Nov 16, 2022 via email

@Ladida1
Copy link

Ladida1 commented Nov 16, 2022

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.

@peepshow-21
Copy link
Owner

peepshow-21 commented Nov 16, 2022 via email

@Ladida1
Copy link

Ladida1 commented Dec 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants