Bonjour,
Voici comment corriger votre problème de mise à niveau de YHN 3.x vers 4.x
Voici un exemple de l'erreur :
yunohost tools migrations migrate
Warning: 'yunohost tools migrations migrate' is deprecated and will be removed in the future, use 'yunohost tools migrations run' instead
Warning: 'yunohost tools migrations migrate' is deprecated and will be removed in the future, use 'yunohost tools migrations run' instead
Info: Running migration 0017_postgresql_9p6_to_11...
Error: Migration 0017_postgresql_9p6_to_11 did not complete, aborting. Error: a bytes-like object is required, not 'str'
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210518-095503-tools_migrations_migrate_forward' to get help
Info: Running migration 0018_xtable_to_nftable...
# Warning: iptables-legacy tables present, use iptables-legacy to see them
Error: Migration 0018_xtable_to_nftable did not complete, aborting. Error: a bytes-like object is required, not 'str'
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210518-095503-tools_migrations_migrate_forward' to get help
Forcer l'installation de posgresql :
apt install postgresql-11
apt update
apt dist-upgrade
pg_ctlcluster 11 main start
Corriger le problème :
Changer out = out.strip().split("\n")
en out = out.strip().split(b"\n")
nano /usr/lib/moulinette/yunohost/data_migrations/0017_postgresql_9p6_to_11.py
nano /usr/lib/moulinette/yunohost/data_migrations/0018_xtable_to_nftable.py
yunohost tools migrations migrate
Voilà votre problème est corrigé.