No module named tomli

Hi all,

I run into this error:

++ sudo --preserve-env --user vagrant env PATH=/home/vagrant/fdroidserver:/home/vagrant/fdroidserver:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk/tools:/opt/android-sdk/platform-tools:/opt/gradle/bin env PYTHONPATH=/home/vagrant/fdroidserver:/home/vagrant/fdroidserver/examples env PYTHONUNBUFFERED=true env TERM=dumb env HOME=/home/vagrant fdroid build --verbose --test --refresh-scanner --scan-binary --on-server --no-tarball de.chadenas.cpudefense:40
Traceback (most recent call last):
  File "/home/vagrant/fdroidserver/fdroid", line 22, in <module>
    fdroidserver.__main__.main()
  File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 192, in main
    mod = __import__('fdroidserver.' + command, None, None, [command])
  File "/home/vagrant/fdroidserver/fdroidserver/build.py", line 42, in <module>
    from . import scanner
  File "/home/vagrant/fdroidserver/fdroidserver/scanner.py", line 41, in <module>
    import tomli as tomllib
ModuleNotFoundError: No module named 'tomli'

How can I fix this? I’ve tried to add
sudo:
- pip install tomli
into the metadata yaml file, but that doesn’t seem to make a difference.

Thanks in advance!
Oliver

you need that tomli in the Docker VM started, not in the .yml file

so BEFORE running fdroid build, pip install first

Sorry, it’s still unclear to me.

I’m talking about building on the gitlab pipeline. How can I interact with the docker container there? I thought it was all automatic, and everything deduced from the yaml file.

And even if I try to build locally, I have no pip available in the docker container.

PS:

Ah, then maybe rebase your fdroiddata fork first?

got it now. I’ve got lots of additional grey hair now, but at last the build succeeds.