`pyproject.toml` 解析失败:`module-name` 字段类型错误导致 `uv sync` 失败
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- build-system
Research direction
Start with packages/bub-dingtalk/pyproject.toml at line 21 and reproduce the failure with uv sync using the dependency configuration shown in the issue. Check the expected module-name type for the packaging tool before correcting the declaration. Done means uv sync completes successfully for a project that includes bub-mcp.
Written by the indexing model from the issue text.
Description
问题描述
执行 uv sync 时,bub-dingtalk 包的 pyproject.toml 解析失败,导致整个依赖安装中断。
错误信息
TOML parse error at line 21, column 15
|
21 | module-name = ["bub_dingtalk", "skills.dingtalk"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
invalid type: sequence, expected a string
复现步骤
在任意项目中引入依赖:
bub-mcp = { git = "https://github.com/bubbuild/bub-contrib.git" }
然后执行:
uv sync
原因分析
packages/bub-dingtalk/pyproject.toml 第 21 行的 module-name 字段被定义为数组:
module-name = ["bub_dingtalk", "skills.dingtalk"]
但该字段期望的类型是 string,而非 sequence,导致 TOML 解析器报错。
建议修复
将 module-name 改为单个字符串,或将多个模块名拆分到不同的配置项中。例如:
module-name = "bub_dingtalk"
如果有多个模块需要声明,请根据具体使用的工具/字段规范进行调整。
影响
此问题会导致所有依赖 bub-contrib 的项目无法完成 uv sync,阻塞整个构建流程。
---
环境信息
- Python 版本:3.12
- 操作系统:Windows 10
---
- Dominant language
- Python
- Stars
- 17
- Forks
- 21
- Avg merge
- 14h 14m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
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.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100