为什么我有 PyProjectException 异常?
我想参与 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论