Snapcraft failed in container

Hi there, I am using the docker image built from the repo https://github.com/cibuilds/snapcraft. Since yesterday, the containers running snapcraft commands failed with the error message:

Traceback (most recent call last):
  File "/snap/snapcraft/current/bin/snapcraft", line 5, in <module>
    from snapcraft.cli.__main__ import run
ModuleNotFoundError: No module named 'snapcraft'

I tried to use the previous version of docker image, but still have the same issue. On my local VM, the snapcraft command is a binary file but in the container it is a python script.

I guess there may be some changes that the version shipped by snap works but the version in the above docker image cannot. Please let me know if you’ve got the same issue.

Thanks,

Oh the snapcraft command is a sym link to snapd command on my local VM.

It works after reverted back to the previous version of snapcraft:

Replace this line: https://github.com/cibuilds/snapcraft/blob/trunk/core20/Dockerfile#L33

to

RUN curl -L https://api.snapcraft.io/api/v1/snaps/download/vMTKRaLjnOJQetI78HjntT37VuoyssFE_6751.snap --output snapcraft.snap && \

6751 is a working revision of snapcraft.

1 Like