BUG: Missing 'requests' in requirements.txt causes ModuleNotFoundError in API utils
In backend/app/utils/API.py, line 1 imports requests: import requests from app.config.settings import SYNC_MICROSERVICE_URL However, requests is neither listed in backend/requirements.txt nor in PyInstaller's PictoPy.spec hiddenimports. As a result, running tests (such as tests/test_folders.py) or invoking backend functions that trigger sync microservice restarts on a clean virtual environment fails with: ModuleNotFoundError: No module named 'requests'
Steps to Reproduce
Set up a fresh virtual environment. Install dependencies using pip install -r backend/requirements.txt. Run pytest tests/test_folders.py. Observe test collection failure due to ModuleNotFoundError: No module named 'requests'.
Proposed Solution
Since the project already standardizes on httpx (pinned in requirements.txt:73 and bundled in PictoPy.spec), we can either: Refactor app/utils/API.py to use httpx.post() to keep dependencies minimal and consistent with the rest of the backend (similar to model_downloader.py). Or explicitly add requests to requirements.txt and PictoPy.spec. I've verified this locally and would love to be assigned to submit a clean PR with unit test coverage.
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
@rohan-pandeyy Hi, could you please review and assign this issue to me so I can submit a PR with the fix and test coverage? Thanks!
Hi @rohan-pandeyy , I checked this issue and noticed that requests is indeed missing from requirements.txt, which causes a ModuleNotFoundError during API calls. I'd like to update the dependencies properly and make sure all the API utils work smoothly. Could you please assign this issue to me?
Hi @nikhilprasad-data, as the author of this issue, I've already reproduced, fixed, and verified the tests locally on my computer, and I have been waiting for assignment.
@rohan-pandeyy, could you please assign this to me so I can push the PR today? Thanks!
Thanks for the update, @sm-daniyal I missed that you were working on it. Best of luck with the PR.