You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

所有Poetry命令报错‘The Poetry config is invalid’的排查求助

解决Poetry install时的配置无效错误

错误原因

错误提示里的正则表达式^[^\n]*$明确要求description字段必须是单行字符串,不能包含换行符。你当前的description使用了多行字符串格式,触发了这个校验规则。

修复步骤

1. 修正description字段

将多行的description改为单行,移除所有换行和多余缩进:

[tool.poetry]
authors = ["你的名字 <你的邮箱@example.com>"]  # 同时补全authors字段
description = "Tombstone is basically composed of a web server process (apiv2 web server) and a celery worker process (aiworker) for running async/background tasks outside of a web request context."
name = "tombstone"
version = "1.0.0"

2. 补全其他缺失配置

你的pyproject.toml还有两处必填字段为空,后续可能触发新错误:

  • authors字段不能为空,需填写作者信息(格式为["Name <email>"])
  • [[tool.poetry.source]]下的url字段需填写对应的私有仓库地址:
[[tool.poetry.source]]
name = "tombstone-common-package"
secondary = true
url = "https://your-package-repo-url.com/"  # 替换为实际仓库地址

3. 重新执行安装

完成上述修改后,重新运行:

poetry install

为什么卸载重装Poetry没用?

问题出在项目的pyproject.toml配置文件,而非Poetry本身的全局配置。因此卸载重装Poetry、移动全局配置文件都无法解决这个问题,只有修正项目的配置文件才能解决。

内容的提问来源于stack exchange,提问作者Mickell Gladness

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 00:20:16