为什么我有 PyProjectException 异常?

发布于 2025-01-16 21:35:51 字数 1011 浏览 1 评论 0原文

我想参与 Github 上的开源 FastAPI。我想翻译框架的文档。我克隆了仓库,然后想用诗歌配置环境。但我面临着问题。当我在包含project.toml的目录中的PowerShell中输入poetry install时,我收到一个错误:

PS C:\\User\\workspace\\FastAPI\\fastapi\> poetry install

PyProjectException

\[tool.poetry\] section not found in C:/User/workspace/FastAPI/fastapi/pyproject.toml

at \~.poetry\\lib\\poetry_vendor\\py3.10\\poetry\\core\\pyproject\\toml.py:56 in poetry_config
52│     def poetry_config(self):  # type: () -\> Optional\[TOMLDocument\]
53│         if self.\_poetry_config is None:
54│             self.\_poetry_config = self.data.get("tool", {}).get("poetry")
55│             if self.\_poetry_config is None:
→ 56│                 raise PyProjectException(
57│                     "\[tool.poetry\] section not found in {}".format(self.\_file)
58│                 )
59│         return self.\_poetry_config
60│

我不知道如何解决这个问题。

I want to participate in Open Source FastAPI on Github. I want to translate framework's documents. I cloned repo, and then wanted to configure environment with poetry. But I face up with problem. When I enter poetry install in PowerShell in the directory with project.tomlI receive an error:

PS C:\\User\\workspace\\FastAPI\\fastapi\> poetry install

PyProjectException

\[tool.poetry\] section not found in C:/User/workspace/FastAPI/fastapi/pyproject.toml

at \~.poetry\\lib\\poetry_vendor\\py3.10\\poetry\\core\\pyproject\\toml.py:56 in poetry_config
52│     def poetry_config(self):  # type: () -\> Optional\[TOMLDocument\]
53│         if self.\_poetry_config is None:
54│             self.\_poetry_config = self.data.get("tool", {}).get("poetry")
55│             if self.\_poetry_config is None:
→ 56│                 raise PyProjectException(
57│                     "\[tool.poetry\] section not found in {}".format(self.\_file)
58│                 )
59│         return self.\_poetry_config
60│

I have no idea how to solve this problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文