Stacktrace for a given requirement file
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the command with the supplied requirements file and Python 3.10 settings. Trace the failure through python_inspector/resolution.py and python_inspector/utils_pypi.py, especially get_requirements_for_package_from_pypi_simple, download_wheel, and the cache get call. Done means this requirement set no longer raises the shown FileNotFoundError and dependency resolution completes or reports a clear error.
Written by the indexing model from the issue text.
Description
Pipenv: 2023.6.26
Python-inspector 0.9.6
I have the following file, generated from pipenv:
-i https://pypi.org/simple
anytree==2.8.0
attrs==21.4.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
iniconfig==1.1.1
jinja2==3.1.2
markupsafe==2.1.1 ; python_version >= '3.7'
packaging==21.3 ; python_version >= '3.6'
pluggy==1.0.0 ; python_version >= '3.6'
py==1.11.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pyparsing==3.0.9 ; python_full_version >= '3.6.8'
pytest==7.1.2
pyyaml==6.0
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
tomli==2.0.1 ; python_version >= '3.7'
Then I run:
python-inspector --python-version 310 --operating-system linux --json-pdt /tmp/ort-PythonInspector8051204820648432355/python-inspector11825923102464191214.json --analyze-setup-py-insecurely --requirement /temp/requirements-from-pipenv.txt --verbose
Then I get the following stacktrace:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/python_inspector/resolve_cli.py", line 247, in resolve_dependencies
resolution_result: Dict = resolver_api(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/api.py", line 254, in resolve_dependencies
resolution, purls = resolve(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/api.py", line 313, in resolve
resolved_dependencies, packages = get_resolved_dependencies(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/api.py", line 351, in get_resolved_dependencies
resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.10/dist-packages/resolvelib/resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.10/dist-packages/resolvelib/resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "/usr/local/lib/python3.10/dist-packages/resolvelib/resolvers.py", line 239, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
File "/usr/local/lib/python3.10/dist-packages/resolvelib/resolvers.py", line 229, in _get_updated_criteria
for requirement in self._p.get_dependencies(candidate=candidate):
File "/usr/local/lib/python3.10/dist-packages/python_inspector/resolution.py", line 639, in get_dependencies
return list(self._iter_dependencies(candidate))
File "/usr/local/lib/python3.10/dist-packages/python_inspector/resolution.py", line 630, in _iter_dependencies
for r in self.get_requirements_for_package(purl=purl, candidate=candidate):
File "/usr/local/lib/python3.10/dist-packages/python_inspector/resolution.py", line 460, in get_requirements_for_package_from_pypi_simple
wheels = utils_pypi.download_wheel(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/utils_pypi.py", line 250, in download_wheel
fetched_wheel_filename = wheel.download(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/utils_pypi.py", line 656, in download
fetch_and_save(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/utils_pypi.py", line 1796, in fetch_and_save
content = CACHE.get(
File "/usr/local/lib/python3.10/dist-packages/python_inspector/utils_pypi.py", line 1655, in get
with open(cached, wmode) as fo:
FileNotFoundError: [Errno 2] No such file or directory: '.cache/python_inspector/https%3A%2F%2Ffiles.pythonhosted.org%2Fpackages%2F02%2F25%2F6ba9f6bb50a3d4fbe22c1a02554dc670682a07c8701d1716d19ddea2c940%2FPyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl'
- Dominant language
- Python
- Stars
- 23
- Forks
- 29
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/python-inspector
-
`packages` is empty when using a non-pypi.org simple index (e.g. Sonatype Nexus)Possibly taken @avika269 claimed this 6 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 62/100
aboutcode-org/python-inspector#268 · 2 comments ·
-
InconsistentCandidate: Pre-Release not allowMay be free again @Anurag-S1ngh claimed this 25 days ago, and no pull request is open. Openbug design nice-to-have
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#257 · 1 comment ·
-
Python Inspector version 0.15.0 contains the wrong version stringMay be free again @Anurag-S1ngh claimed this 18 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
aboutcode-org/python-inspector#253 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
aboutcode-org/python-inspector#246 · 2 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#242 · 1 comment ·
All issues in aboutcode-org/python-inspector
Similar issues
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Internal ErrorOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
frappe/frappe_docker#2071 ·
Maintainers usually reply within 1 day
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·
-
comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#157702 ·
Maintainers usually reply within 1 day