package resolution fails with TypeError: '<' not supported between instances of 'str' and 'NoneType'
还没有人认领这个 Issue。
评估
调研方向
使用 issue 中的命令重现失败,然后检查 python_inspector/package_data.py,尤其是 choose_single_wheel,以及 traceback 中显示的 api.py 调用路径。依赖解析在没有报告的 TypeError 的情况下完成,并写入所请求的 python-inspector.json 输出,即表示完成。
由索引模型根据 Issue 内容生成。
描述
python-inspector --python-version 313 --operating-system linux --json-pdt python-inspector.json --requirement requirements.txt --verbose
returns the following error message:
retrieve package data from pypi:
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
retrieved package 'pkg:pypi/[email protected]'
Traceback (most recent call last):
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/resolve_cli.py", line 259, in resolve_dependencies
resolution_result: Dict = resolver_api(
^^^^^^^^^^^^^
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/api.py", line 312, in resolve_dependencies
packages = [pkg.to_dict() for pkg in asyncio.run(gather_pypi_data()) if pkg is not None]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/api.py", line 310, in gather_pypi_data
return await asyncio.gather(*[get_pypi_data(package) for package in purls])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/api.py", line 298, in get_pypi_data
data = await get_pypi_data_from_purl(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/package_data.py", line 82, in get_pypi_data_from_purl
wheel_url = choose_single_wheel(wheel_urls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/scheer/.local/lib/python3.12/site-packages/python_inspector/package_data.py", line 128, in choose_single_wheel
wheel_urls.sort(reverse=True)
TypeError: '<' not supported between instances of 'str' and 'NoneType'
- 主要语言
- 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 于 8 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
aboutcode-org/python-inspector#259 · 1 条评论 ·
-
InconsistentCandidate: Pre-Release not allow可能重新可做 @Anurag-S1ngh 于 8 天前认领,目前没有进行中的 PR。 未关闭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 于 9 天前认领。 未关闭
难度 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 于 8 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
aboutcode-org/python-inspector#253 · 2 条评论 ·
查看 aboutcode-org/python-inspector 的全部 Issue
相似的 Issue
-
area:scripts area:tests bug priority:later
难度 2/5 1-3 小时 新手友好度 72/100
Ikalus1988/MisakaNet#4358 ·
维护者通常 1 天内回复
-
Discovered ports from service discovery are never propagated to modules in Module.load()可能已有人在做 @vishalmore90 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
OWASP/Nettacker#1828 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
aws-samples/sample-per-model-bedrock#708 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sjkim1127/Reversecore_MCP#365 ·
维护者通常 1 天内回复