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

[BUG] No module named 'requests' #4450

Open
espr14 opened this issue Feb 1, 2025 · 2 comments
Open

[BUG] No module named 'requests' #4450

espr14 opened this issue Feb 1, 2025 · 2 comments
Assignees
Labels
bug Something isn't working.

Comments

@espr14
Copy link
Contributor

espr14 commented Feb 1, 2025

Printer model

all

Firmware version

6.2.0

Upgrades and modifications

no

Printing from...


Describe the bug

New version 6.2.0 uses Python package requests in utils\bootstrap.py which is not installed and installing does not help.

How to reproduce

python utils/build.py --bootloader empty --preset mini-en-cs --final
Building mini-en-cs_release_emptyboot
-- Python3: C:/git/P32-FW/.venv/Scripts/python.exe
-- The CXX compiler identification is GNU 13.2.1
-- Check for working CXX compiler: C:/git/P32-FW/.dependencies/gcc-arm-none-eabi-13.2.1/bin/arm-none-eabi-g++.exe
Traceback (most recent call last):
  File "C:\git\P32-FW\utils\bootstrap.py", line 25, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
CMake Error at C:/git/P32-FW/cmake/Utilities.cmake:32 (message):
  Failed to obtain recommended gcc version from utils/bootstrap.py
Call Stack (most recent call first):
  C:/git/P32-FW/cmake/GccArmNoneEabi.cmake:6 (get_recommended_gcc_version)
  C:/git/P32-FW/build/mini-en-cs_release_emptyboot/CMakeFiles/3.28.3/CMakeSystem.cmake:6 (include)
  C:/git/P32-FW/build/mini-en-cs_release_emptyboot/CMakeFiles/CMakeScratch/TryCompile-3fydgs/CMakeLists.txt:2 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error at .dependencies/cmake-3.28.3/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:49 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!

Building finished: 0 success, 1 failure(s).

Expected behavior

Building finished: 1 success, 0 failure(s).

Files

No response

@espr14 espr14 added the bug Something isn't working. label Feb 1, 2025
@espr14 espr14 marked this as a duplicate of #4446 Feb 1, 2025
@rcloran
Copy link
Contributor

rcloran commented Feb 2, 2025

https://gist.github.com/rcloran/56f89281c9aa321257cf6164dfc505bd works around this for me ... I'm not sure if it's a correct fix, so I'm hesitant to send a PR with it, though.

rcloran referenced this issue in rcloran/Prusa-Firmware-Buddy Feb 2, 2025
- replace urlretrieve with requests
- cleanup download_and_unzip function during bootstrap
- adjust python requirements for pipeline and dev
- fix docker scripts
- create .dependencies folder during bootstrapping in case it does not
  exist

BFW-6626
@Tomcus
Copy link
Contributor

Tomcus commented Feb 3, 2025

Hi thanks, for reporting the issue. We know of these issues and fixed them in our private repository and they will be fixed in 6.2.1 or in 6.3.1 depending on what is released first :). @rcloran's solution is bit hacky, but just installing the requests package into the virtual environment should be enough.

The easiest solution for you now should be running:

.venv/bin/pip3 install requests

@Tomcus Tomcus self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

3 participants