aboutcode-org / python-inspector

Inspect Python code and PyPI package manifests. Resolve Python dependencies.
22 stars 19 forks source link

Issue for python-inspector #175

Open buwagaurav opened 5 months ago

buwagaurav commented 5 months ago

Using below requirements.txt file and boto3==1.9.184 Events==0.2.1 Jinja2==2.10.1 jsonschema==3.0.1 requests==2.21.0 avro-python3==1.8.2 SQLAlchemy==1.3.15 pylzma==0.4.8 cachetools==2.0.0 toposort==1.5 splunk-handler==2.0.7 python-json-logger==0.1.9 PyYAML==5.1 psycopg2-binary==2.8.4 egis==1.1.3.post0 pose2==1.1.4 arrow==0.10.0 bottle==0.12.12 confuse==0.4.0

While running command: python-inspector --python-version 311 --operating-system macos --json-pdt o.json --analyze-setup-py-insecurely --requirement /Users/gbuwa/IdeaProjects/terrestrial-pipeline/python/requirements.txt getting below error.

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/resolve_cli.py", line 257, in resolve_dependencies resolution_result: Dict = resolver_api( ^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/api.py", line 280, in resolve_dependencies resolution, purls = resolve( ^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/api.py", line 344, in resolve resolved_dependencies, packages = get_resolved_dependencies( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/api.py", line 385, in get_resolved_dependencies resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/resolvelib/resolvers.py", line 546, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/resolvelib/resolvers.py", line 397, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/resolvelib/resolvers.py", line 148, in _add_to_criteria matches = self._p.find_matches( ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/resolution.py", line 612, in find_matches candidates = sorted( ^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/resolution.py", line 588, in _iter_matches versions.extend(self.get_versions_for_package(name=name, repo=repo)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/resolution.py", line 398, in get_versions_for_package return self.get_versions_for_package_from_repo(name, repo) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/resolution.py", line 409, in get_versions_for_package_from_repo for version, package in repo.get_package_versions(name).items(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/utils_pypi.py", line 1550, in get_package_versions self._get_package_versions_map( File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/utils_pypi.py", line 1518, in _get_package_versions_map links = self.fetch_links( ^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/utils_pypi.py", line 1596, in fetch_links text = CACHE.get( ^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/utils_pypi.py", line 1687, in get content = get_file_content( ^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_inspector/utils_pypi.py", line 1736, in get_file_content raise Exception(f"Unsupported URL scheme: {path_or_url}") Exception: Unsupported URL scheme: h/boto3