Comments (5)
That's nothing to worry about.
The error occurs when decode-config is started with an outdated Python V2 (has reached EOL 01 Jan 2020), but decode-config is written for Python V3.
The script expects the command python
starts a V3. This should also be the operating system default because V2 should be an exception due to EOL.
If you have both versions installed, you should configure your system so that the command python
starts a python V3, not V2 and V2 only starts when python2
is explicitly entered or simnply uninstall V2. How this works, depends on your OS, there is no general answer.
from decode-config.
Your first call started python2 from somewhere, nonlocal
is a python3 keyword, this error occurs if you try to run the script using python2
Your python installation seems to be a mix of python2 and python3 - check and cleanup
from decode-config.
Can not be reproduce
It looks like a local mixup of outdated script and/or mix of python env.
from decode-config.
Ah!
Yes, I have both.
ubuntu@ubuntu:~/tasmota/configs$ python -V
Python 2.7.18
ubuntu@ubuntu:~/tasmota/configs$ python3 -V
Python 3.8.10
Changed here and it works now:
ubuntu@ubuntu:~/tasmota/configs/decode-config-development$ more decode-config.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
ubuntu@ubuntu:~/tasmota/configs/decode-config-development$ ./decode-config.py -s $deviceip -g System | jq
{
"bootcount": 9,
"bootcount_reset_time": 1673771115,
"cfg_crc": "0x764d",
"cfg_crc32": "0xc1a45fcc",
"cfg_holder": 4617,
"cfg_size": 4096,
"cfg_timestamp": 1673891708,
"header": {
"data": {
"crc": "0xb91e",
"crc32": "0xc1a45fcc",
"hardware": "ESP82",
"size": 4096,
"version": {
"id": "0xc030103",
"name": "12.3.1.3"
}
},
"env": {
"platform": "Linux-5.4.0-1078-raspi-aarch64-with-glibc2.29",
"python": "3.8.10",
"script": "decode-config.py v12.3.1.3 [7e18bc3]",
"system": "Linux aarch64 5.4.0-1078-raspi #89-Ubuntu SMP PREEMPT Mon Dec 5 08:38:35 UTC 2022"
},
"template": {
"crc": "0x764d",
"crc32": "0xc1a45fcc",
"size": 4096,
"version": {
"id": "0xc030103",
"name": "12.3.1.3"
}
},
"timestamp": "2023-01-16 17:55:08"
},
"version": "0xc030103"
}
from decode-config.
I had this same problem, fixed it with the change to "python3" inside the file.
I don't know much about Python environments, but I gather this is not a bug but a configuration problem? Should I worry? How should I fix my setup? I only use it for decode-config, on this computer.
Thanks
from decode-config.
Related Issues (20)
- Allow to source non-dmp files for format conversions in one fell swoop HOT 2
- decode-config behind a proxy ERROR 10 (@3892): Device did not respond properly HOT 3
- Managing multiple devices
- Release action for packaging and publishing reference outdated version on release update HOT 1
- Github Release Action for adding binary executables to Release Assets HOT 13
- Command option - TimeZone command is not proper
- intermittent struct.error HOT 3
- convert json to dmp doesn't find json file HOT 3
- dmp-file size tasmota13.1.0 seems to mismatch decode-config file size requirement
- Invalid continuation character with UTF-8 encoding HOT 4
- Ignore minor version changes automatically HOT 4
- returncode to bash is always 0
- Example of how to extract say the 'Template' from the dump file?
- utcfromtimestamp() deprecated HOT 1
- "--output-format cmnd" outputs DzIdx1 wrongly as DomoticzIdx1 etc... for all Domoticz related commands
- Missing module setting in the JSON file for ESP32-C3 ("config_version": 4) HOT 6
- array 'ds3502_state' couldn't restore, format has changed HOT 3
- Error restore script json into rules based config
- fallback_module bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decode-config.