Closed boxofrox closed 3 years ago
FYI. It appears the espressif team ran into a bug in pyparsing 2.4.0+ that prevented them from upgrading that dependency.
I've been at tearing at the code for at least four days trying to write an upgrade patch. I'm currently stuck at indentedBlock
is broke and parsing beyond an indented region into the subsequent unindented region.
Hi @boxofrox ! Could you please provide the contents of /home/devuser/files/development/embedded/esp-cam/.pio/build/usb/CMakeFiles/CMakeOutput.log
?
I placed the output of CMakeOutput.log
in a gist [1]. The lines are fairly long and numerous, and seems easier to view the entire log with gist's raw file view.
The log file was generated by first uninstalling the platform-espressif32, removing my extra_scripts
patches, and installing platform-espressif32 to return to unmodified, stock packages. Then ran pio run --verbose
to kick off the build again, and verified the error matched the OP.
[1]: https://gist.github.com/boxofrox/0b799f7045cf6112dd2291eb62f5cfa4
Added output of pip freeze
(ran in /home/devuser/files/development/embedded/esp-cam
) to gist.
Is it a problem for you to reinstall the pyparsing package with any eligible version for ESP-IDF? As an alternative, you can install PlatformIO in an virtual environment which will be isolated from your system-wide installed packages.
Is it a problem for you to reinstall the pyparsing package with any eligible version for ESP-IDF?
I'm not sure. I figure since PlatformIO uses python, other tooling managed by PIO might also use python, and setting up a private python environment for ESP-IDF may cause other havoc for me at some point.
While I'm a polyglot programmer, I've avoided python, so I've got a bit of a learning curve to overcome. Will try to set up a python venv and a docker container and see what happens. I suspect the latter won't play well with uploading.
Thanks for taking a look.
You can use a universal installation script https://docs.platformio.org/en/latest/core/installation.html?highlight=virtual#step-2-install-platformio-core, so no need to mess with Docker.
@veleros Can confirm that the universal installation script was able to provide an isolated python + PlatformIO, and the espressif platform installed _pyparsing-2.3.1__ and compiled an "empty"/new project successfully.
FYI to anyone else searching for a solution.
/home/user/.platformio/penv
.source ~/.platformio/penv/bin/activate
(or add this command to your .bashrc, etc) to configure the environment to run the isolated python + platformio.pio run
will download esp-idf, install dependencies, and compile!
Synopsis
On ArchLinux and NixOS, the system package manager installs pyparsing-2.4.7. The espidf framework is unable to install an appropriate version of pyparsing. One user posted on the PlatformIO forum they tried to use
venv
to construct a python environment with an older version of pyparsing to no avail [1].Are there any work arounds for this issue? My searches yielded few relevant results.
This error effectively makes platformio useless for my ESP32-related development. Would it make sense to incorporate patches that support pyparsing >2.4.0 in platform-espressif?
[1]: https://community.platformio.org/t/espressif32-python-dependencies/15839
Details
In a new, empty platformio project, I've set the following settings...
...and when I run
pio run
, I find the following error: