Skip to content

Wrongly capitalizes module name: "Requests" #500

@Michal-Martinek

Description

@Michal-Martinek

here's my command:

>>> pipreqs . --force --encoding=utf-8 --mode no-pin --debug
DEBUG: Found packages: {'time', 'subprocess', 'urllib', 'sys', 'typing', 'requests', 'logging', 'os', 'base64', 'traceback', 'webbrowser', 'linecache', 'json', 'csv', 'tqdm', 'socketserver', 'datetime', 'concurrent', 'collections', 'math', 'http', 'glob', 'cProfile', 'pstats'}
DEBUG: Found imports: Requests, tqdm
DEBUG: Getting packages information from Local/PyPI
WARNING: Import named "Requests" not found locally. Trying to resolve it at the PyPI server.
DEBUG: Starting new HTTPS connection (1): pypi.python.org:443
DEBUG: https://pypi.python.org:443 "GET /pypi/Requests/json HTTP/11" 301 122
DEBUG: Starting new HTTPS connection (1): pypi.org:443
DEBUG: https://pypi.org:443 "GET /pypi/requests/json HTTP/11" 200 37837
WARNING: Import named "Requests" was resolved to "requests:2.32.5" package (https://pypi.org/project/requests/).
Please, verify manually the final list of requirements.txt to avoid possible dependency confusions.
DEBUG: Writing 2 requirements: Requests, tqdm to .\requirements.txt
INFO: Successfully saved requirements file in .\requirements.txt

it for some reason tries to resolve "Requests" with a capital, not "requests"
I checked my code, i used "Requests" nowhere, only the standart import requests.
Even after nuking "requirements.txt" and trying again (with pretty much any set of arguments) is does the same.

environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions