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

build action fails due to ModuleNotFoundError: No module named 'pkg_resources': #1500

Closed
helgeerbe opened this issue Nov 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@helgeerbe
Copy link
Contributor

What happened?

When the build.yml action runs it fails due to the error ModuleNotFoundError: No module named 'pkg_resources': when running the command pio run -e ${{ matrix.environment }}

To Reproduce Bug

trigger build action

Expected Behavior

pio run -e ${{ matrix.environment }}runs successfully in the script

Install Method

Pre-Compiled binary from GitHub

What git-hash/version of OpenDTU?

2991af7

Relevant log/trace output

Run pio run -e generic_esp32
********************************************************************************
If you like PlatformIO, please:
- star it on GitHub > https://github.com/platformio/platformio-core
- follow us on LinkedIn to stay up-to-date on the latest project news > https://www.linkedin.com/company/platformio/
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************

Processing generic_esp32 (board: esp32dev; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
Platform Manager: Installing espressif32 @ 6.3.2
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Platform Manager: [email protected] has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected]+2021r2-patch5 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.20009.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.40501.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Tool Manager: Installing platformio/tool-openocd-esp32 @ ~2.1100.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40502.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Library Manager: Installing git+https://github.com/yubox-node-org/ESPAsyncWebServer
git version 2.42.0
Cloning into '/home/runner/.platformio/.cache/tmp/pkg-installing-vugmwg4v'...
Library Manager: ESP Async [email protected]+sha.1dde9cf has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing me-no-dev/AsyncTCP @ ^1.1.1
Downloading 0% 10% 20% 30%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing bblanchon/ArduinoJson @ ^6.21.3
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing git+https://github.com/bertmelis/espMqttClient.git#v1.4.5
git version 2.42.0
Cloning into '/home/runner/.platformio/.cache/tmp/pkg-installing-7m3moqno'...
Note: switching to '490a94ab25e994dfe4905ffc0a155d0257ade404'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Library Manager: [email protected]+sha.490a94a has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing nrf24/RF24 @ ^1.4.8
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing olikraus/U8g2 @ ^2.35.7
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing buelowp/sunset @ ^1.1.7
Downloading 0% 10% 20% 30%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing git+https://github.com/coryjfowler/MCP_CAN_lib
git version 2.42.0
Cloning into '/home/runner/.platformio/.cache/tmp/pkg-installing-zusrn2j7'...
Library Manager: [email protected]+sha.6f1f30c has been installed!
Library Manager: Installing plerup/EspSoftwareSerial @ ^8.0.1
Downloading 0% 10% 20% 30% 40% 50%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing mobizt/FirebaseJson @ ^3.0.6
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing rweather/Crypto @ ^0.4.0
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: [email protected] has been installed!
Verbose mode can be enabled via `-v, --verbose` option
ModuleNotFoundError: No module named 'pkg_resources':
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/platformio/builder/main.py", line 167:
    env.SConscript(env.GetExtraScripts("pre"), exports="env")
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/runner/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/runner/work/OpenDTU-OnBattery/OpenDTU-OnBattery/pio-scripts/auto_firmware_version.py", line 5:
    import pkg_resources
========================= [FAILED] Took 54.29 seconds =========================

Environment    Status    Duration
-------------  --------  ------------
generic_esp32  FAILED    00:00:54.293
==================== 1 failed, 0 succeeded in 00:00:54.293 ====================
Error: Process completed with exit code 1.

Anything else?

To avoid. this error follow https://docs.platformio.org/en/stable/integration/ci/github-actions.html

and replace all occurrences of python-version: "3.x" with python-version: "3.9"

Copy link

github-actions bot commented Apr 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant