No module named 'yaml'

未关闭
#235 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
github-actions, python
领域
ci-cd, devops

调研方向

从 .github/workflows/appmap-archive.yml 开始,比较 issue 中链接的失败和成功的 workflow 运行,重点关注 AppMap installer 选项和 Python 环境。追踪 appmap.configuration 无法 import yaml 的原因,然后让 workflow 可靠地提供该依赖,并通过另一次运行验证结果。

由索引模型根据 Issue 内容生成。

描述

bug

Error seems to be intermittent?

https://github.com/land-of-apps/Promptify/actions/runs/4723050827/jobs/8378470252

Error processing line 1 of /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/appmap.pth:
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site.py", line 169, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/appmap/__init__.py", line 2, in <module>
      from _appmap import generation  # noqa: F401
    File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/_appmap/__init__.py", line 1, in <module>
      from . import configuration
    File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/_appmap/configuration.py", line 13, in <module>
      import yaml
  ModuleNotFoundError: No module named 'yaml'
Remainder of file ignored
============================= test session starts ==============================
platform linux -- Python 3.9.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/runner/work/Promptify/Promptify
plugins: appmap-1.[15](https://github.com/land-of-apps/Promptify/actions/runs/4723050827/jobs/8378470252#step:6:16).0
collected 9 items

This workflow run succeeded and I don't think there are any relevant changes between them:

https://github.com/land-of-apps/Promptify/actions/runs/4723021733

The change does introduce some options to the automated AppMap installer:

diff --git a/.github/workflows/appmap-archive.yml b/.github/workflows/appmap-archive.yml
index 14dab18..02859ed 100644
--- a/.github/workflows/appmap-archive.yml
+++ b/.github/workflows/appmap-archive.yml
@@ -26,6 +26,8 @@ jobs:
         uses: getappmap/install-appmap-action@v1-pre.8
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
+          project-type: pip
+          build-file: requirements-dev.txt
           verbose: true

Here's the installer log:

/tmp/appmap install --no-interactive --no-overwrite-appmap-config --project-type pip --build-file requirements-dev.txt
Installing AppMap agent for ....

- Installing AppMap...



This project contains multiple Pip requirements files. AppMap should only be
installed during development and testing, not when deploying in a production
environment.



   ╭─────────────────────────────────────────────────────────────────────╮
   │                                                                     │
   │              Success! AppMap has finished installing.               │
   │                                                                     │
   │                      NEXT STEP: Record AppMaps                      │
   │                                                                     │
   │   You can consult the AppMap documentation, or continue with the    │
   │     instructions provided in the AppMap code editor extension.      │
   │                                                                     │
   ╰─────────────────────────────────────────────────────────────────────╯


AppMap language library has been installed and configured.
git add -N .
git diff > .appmap/appmap-install.patch
Patch file contents:

主要语言
Python
星标
104
派生
17
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getappmap/appmap-python 的其他 Issue

查看 getappmap/appmap-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。