Issue with pipenv and the 'requests' package

I used to be able to run the tests fine about one month ago, but coming back to the project, they now fail with the following error:

> codecrafters test
Initiating test run...

⚡ This is a turbo test run. https://codecrafters.io/turbo

Running tests. Logs should appear shortly...

[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.

[tester::#FI9] Running tests for Stage #FI9 (Discover peers)
[tester::#FI9] Running ./your_program.sh peers /tmp/torrents2553366049/test.torrent
[your_program] Traceback (most recent call last):
[your_program]   File "<frozen runpy>", line 198, in _run_module_as_main
[your_program]   File "<frozen runpy>", line 88, in _run_code
[your_program]   File "/app/app/main.py", line 4, in <module>
[your_program]     import requests
[your_program] ModuleNotFoundError: No module named 'requests'
[tester::#FI9] Application didn't terminate successfully without errors. Expected 0 as exit code, got: 1
[tester::#FI9] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

View our article on debugging test failures: https://codecrafters.io/debug

I tried re-starting a project from scratch to do a new setup of the repo but i get the same error.

Any help on how to fix this is appreciated.

Thanks!

Hey @zebra-296, it looks like that pipenv isn’t wired up properly in your repo.

I’ve pushed a fix to your repo. You can run git pull to sync it.

Let me know if you’re still running into issues!

It seems to be working so far. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.