Closed hary66 closed 3 years ago
Hi Harold,
It seems there is something wrong with your python installation. You have a locally installed "reprlib" in your home folder for python 2.7 that your python 3 is trying to access. The tool chain should work fine with python 3, that's what the CI build is using as well.
I'm not really sure how to approach solving this as I don't know how your system is set up. Maybe try analyzing and cleaning up your python environment, remove anything that was not installed by pip or your operating system's package manager, especially things in /home/Harold/.local/lib/
Let me know if you need further assistance.
Ok, there was something wrong with my python setup on my computer.
I finally got the ESP32 flashed and can retrieve the json data with mosquitto running on my Raspberry pi sever.
Would you mind to share your Nodered flow ?
Hi Harold,
I'm glad to hear you got it working!
What are you interested in when it comes to node red? I mostly only push most of the data to influxdb and have simple dashboard UI elements. I also use solcast to predict solar power output.
Hi Robert and first of all, thank you very much for the esp32 update. It should give us the opportunity to have nice and easy remote control to the SBMS.
I thought you had made some kind of Nodered dashboard. But if you didn't, that's ok, I'll sort something out myself. The only point is that it will take more time as I'm learning the thing.
I before tried to use the TICK telegraf/grafana/influxdb but never succeeded. So it would be very nice if you would share your setup in detail and if possible even better like a tutorial. It would be a very instructive learning case to use all these tools, solcast included.
By the way, I needed to link the esp32's Rx to FTDI USB/UART converter's Rx and esp32's Tx to FTDI USB/UART converter's Tx to get the upload possible. Not Rx->Tx and Tx->Rx as supposed !
Ok, there was something wrong with my python setup on my computer.
I finally got the ESP32 flashed and can retrieve the json data with mosquitto running on my Raspberry pi sever.
Would you mind to share your Nodered flow ?
Hi.`
I tried to make the procedure from a Raspberry pi but the command :
platformio run
led to that error :Error: Could not find the package with ‘platformio/tool-ninja @ ^1.7.0’ requirements for your system ‘linux_armv7l’
I then tried from an x86 pc but I had some error showing some python2 and python3 stuff, making me thinking that the procdedure was calling the default python interpreter which is python3 in my case when the procedure needs pyhton2 instead.
Am I right to think the procedure really needs python 2 ? any advice to modify the default python interpreter to python2 on my pc running linux mint20 ?
Or how to instruct your procedure to use python2 instead of python3 ?
Here is the entire errors I get :
~/SBMS_update/electrodacus-esp32$ platformio run Processing serial (platform: https://github.com/platformio/platform-espressif32.git; board: nodemcu-32s; framework: arduino, espidf) Verbose mode can be enabled via
-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/nodemcu-32s.html PLATFORM: Espressif 32 (2.1.0+sha.a58a358) > NodeMCU-32S HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:Original exception was: Traceback (most recent call last): File "genVersion.py", line 1, in
import subprocess
File "/usr/lib/python3.8/subprocess.py", line 49, in
import signal
File "/usr/lib/python3.8/signal.py", line 3, in
from functools import wraps as _wraps
File "/usr/lib/python3.8/functools.py", line 18, in
from collections import namedtuple
File "/usr/lib/python3.8/collections/init.py", line 27, in
from reprlib import recursive_repr as _recursive_repr
File "/home/harold/.local/lib/python2.7/site-packages/reprlib/init.py", line 7, in
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
OSError: 'python genVersion.py' exited 1:
File "/home/harold/.local/lib/python2.7/site-packages/platformio/builder/main.py", line 170:
env.SConscript("$BUILD_SCRIPT")
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
return _SConscript(self.fs, *files, subst_kw)
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
exec file in call_stack[-1].globals
File "/home/harold/.platformio/platforms/espressif32/builder/main.py", line 224:
target_elf = env.BuildProgram()
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, *kwargs)
File "/home/harold/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 61:
env.ProcessProgramDeps()
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(nargs, kwargs)
File "/home/harold/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 124:
env.ProcessFlags(env.get("BUILD_FLAGS"))
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(nargs, kwargs)
File "/home/harold/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 222:
env.Append(env.ParseFlagsExtended(flags))
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(nargs, **kwargs)
File "/home/harold/.local/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 185:
for key, value in env.ParseFlags(str(raw)).items():
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 810:
do_parse(arg)
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 676:
arg = self.backtick(arg[1:])
File "/home/harold/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 594:
raise OSError("'%s' exited %d" % (command, status))
========================================== [FAILED] Took 0.37 seconds ==========================================
Environment Status Duration
serial FAILED 00:00:00.368 ==================================== 1 failed, 0 succeeded in 00:00:00.368 ====================================
`