charmcraft build failed on ubuntu focal

Bug #1960384 reported by Joe Guo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
charm-cloudstats
Fix Released
High
Xav Paice

Bug Description

I am using snap for charmcraft.

Also, I added a charmcraft yaml file as prompted:

cat charmcraft.yaml

type: charm
bases:
  - name: "ubuntu"
    channel: "20.04"
    architectures: ["amd64"]

charmcraft clean && charmcraft build -t

```
    from .environment import Environment as Environment
  File "/tmp/pip-install-3z_ax2yv/Jinja2/src/jinja2/environment.py", line 15, in <module>
    from markupsafe import Markup
ModuleNotFoundError: No module named 'markupsafe'
```

Even though I modified requirements.txt to be like this:

```
cat requirements.txt

wheel
markupsafe # markupsafe is added for above error
charmhelpers
ops
```
But error is same.

full output: https://pastebin.canonical.com/p/3f43XBv7pB/

Related branches

Xav Paice (xavpaice)
Changed in charm-cloudstats:
status: New → Triaged
importance: Undecided → High
Xav Paice (xavpaice)
Changed in charm-cloudstats:
assignee: nobody → Xav Paice (xavpaice)
Revision history for this message
Joe Guo (guoqiao) wrote :

xav's patch is merged into master. main changes:

1. add charmcraft.yaml with `python3-marksafe`:

```
> $ cat charmcraft.yaml
type: charm
parts:
  charm:
    build-packages: [python3-markupsafe, bash]
```

2. limit Jinjia2 version:

```
cat requirements.txt
Jinja2<3
```

I have verified `charmcraft build` is working on my machine (focal).

Changed in charm-cloudstats:
status: Triaged → Fix Committed
Chi Wai CHAN (raychan96)
Changed in charm-cloudstats:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.