【发布时间】:2022-07-22 20:06:08
【问题描述】:
问题
自从我从 Python 3.8 迁移到 Python 3.10 后,我在任何 GitHub 运行器上的 CI/CD 管道 (Github Actions) 中使用 poetry install 时遇到问题。
Installing dependencies from lock file
Package operations: 79 installs, 0 updates, 0 removals
• Installing pyparsing (3.0.9)
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at /opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/json/decoder.py:355 in raw_decode
351│ """
352│ try:
353│ obj, end = self.scan_once(s, idx)
354│ except StopIteration as err:
→ 355│ raise JSONDecodeError("Expecting value", s, err.value) from None
356│ return obj, end
357│
Error: Process completed with exit code 1.
我没有更改 pyproject.toml 文件中的任何 lib 配置,但正如您在上面看到的:Poetry 隐藏了 StackTrace 的大部分内容。
我尝试了什么
- 重新创建
poetry.lock文件。 - 使用
rm -r ~/.cache/pypoetry/cache/(和rm -r ~/.cache/pypoetry/)删除诗歌缓存。 - 删除什么返回错误的库(实际上,这个问题似乎发生在任何库上,所以这就是我理解它可能与诗歌和 python 有关的原因)
问题
知道如何在我的 CI/CD 管道中解决此问题吗?
【问题讨论】:
标签: github-actions python-3.10 poetry