getappmap / getappmap/appmap-python

No module named 'yaml'

Open
#235 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
104
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/appmap-archive.yml and compare the failed and successful workflow runs linked in the issue, focusing on the AppMap installer options and the Python environment. Trace why appmap.configuration cannot import yaml, then make the workflow reliably provide that dependency and verify the result with another run.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.