Stacktrace for a given requirement file
还没有人认领这个 Issue。
评估
调研方向
首先,使用提供的 requirements 文件和 Python 3.10 设置复现该命令。通过 python_inspector/resolution.py 和 python_inspector/utils_pypi.py 跟踪失败,尤其关注 get_requirements_for_package_from_pypi_simple、download_wheel 以及 cache 的 get 调用。完成的标准是:该 requirements 集不再引发所示的 FileNotFoundError,并且依赖解析完成或报告清晰的错误。
由索引模型根据 Issue 内容生成。
描述
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'
- 主要语言
- Python
- 星标
- 23
- 派生
- 29
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aboutcode-org/python-inspector 的其他 Issue
-
难度 3/5 半天 新手友好度 62/100
aboutcode-org/python-inspector#268 · 1 条评论 ·
-
Add support for pylock.toml可能已有人在做 @Anurag-S1ngh 于 6 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
aboutcode-org/python-inspector#259 · 1 条评论 ·
-
InconsistentCandidate: Pre-Release not allow可能已有人在做 @Anurag-S1ngh 于 6 天前认领。 未关闭bug design nice-to-have
难度 4/5 3-5 天 新手友好度 35/100
aboutcode-org/python-inspector#257 · 1 条评论 ·
-
Feature request: Mask repository credentials in --verbose output可能已有人在做 @Rajeshwari2857 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 58/100
aboutcode-org/python-inspector#254 · 4 条评论 · 4 个 reaction ·
-
Python Inspector version 0.15.0 contains the wrong version string可能已有人在做 @Anurag-S1ngh 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
aboutcode-org/python-inspector#253 · 1 条评论 ·
查看 aboutcode-org/python-inspector 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
namespace operations
难度 1/5 1 小时以内 新手友好度 65/100
EclipseFdn/open-vsx.org#15057 ·
维护者通常 1 天内回复
-
Mission statement: why this is free, in the README, Why This Exists and the wiki Home可能已有人在做 @ChiefGyk3D 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
vllm-project/vime#508 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复