Python issues after migrating to Bookworm - No module named yunohost /

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.8.2
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: No

Describe your issue

Hello all,

After migrating to bookworm, I’ve been prompted to take the migration steps to regenerate the virtualenv of Python apps (synapse, mautrix_telegram and funkwhale).

One of those apps (funkwhale) was marked as potentially being upgradable by the migration script, the two other needed a manual yunohost app upgrade --force.

The script failed (https://paste.yunohost.org/raw/eziyarurup) because of a dependency conflict.
I was advised (by the migration script) to run yunohost app upgrade --force funkwhale

Which I did, without success (https://paste.yunohost.org/raw/fexekohavo).
There, the error is more strange ’ ModuleNotFoundError: No module named ‘yunohost’ ’ in the /usr/bin/yunohost
So I removed funkwhale and tried to install it again, but got the same error.

When trying to upgrade mautrix_telegram, I also got an error that ended up in the uninstallation of the app (https://paste.yunohost.org/raw/elefuxuziv).
Then I tried to restore it from backup, but I got an error that there is " No module named mautrix_telegram" (https://paste.yunohost.org/raw/ezavavumoy).

I was first tempted to open ticket on the repos of those 2 projects, but I feel like there is something more related to the state of Python3 on my machine.
Can someone help?

Share relevant logs or error messages

/

Update: I was able to fix the issue for funkwhale by slightly modifying the install script (deactivating the virtual environment when it is not needed anymore) - See Deactivate venv before running yunohost service tools · e-jim/funkwhale_ynh@ea9e23a · GitHub

It is hackish at best, but it works.

So I guess the issue is more at an app level, in a way.

I wasn’t able to find a way to fix the restore script of mautrix_telegram (yet), though.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.