Page 1 of 1

upgrade 2.0.0.9450

Published: August 16, 2021 - 12:27
by fck_mly
Good morning,

Following the public announcement regarding the vulnerability and the upgrade to version 2.0.0.9450, I encounter an error message when I launch the upgrade:

Code: Select all

The following packages will be upgraded:
  aspell krb5-locales krb5-user libaspell15 libgssapi-krb5-2 libgssrpc4 libk5crypto3 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9 libkrb5-3 libkrb5support0
  libnss-systemd libpam-systemd libsystemd0 libudev1 linux-image-4.19.0-17-amd64 systemd systemd-sysv tis-waptserver tis-waptsetup udev
22 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/131 MB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f22ac063740 (most recent call first):
Aborted
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10
Looking around a bit, I saw that I had python 2.7 and python 3.7 in /usr/local/lib.
Should I "uninstall" Python 2.7?
Do you have any suggestions for resolving this error message?

Thank you in advance.

Re: Upgrade 2.0.0.9450

Published: August 16, 2021 - 3:28 PM
by sfonteneau

Code: Select all

python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
>>> import locale
>>> locale.getpreferredencoding()
'UTF-8'
>>> 
Can you try this on your machine to see if getpreferredencoding works?

Re: Upgrade 2.0.0.9450

Published: August 16, 2021 - 3:38 PM
by fck_mly
Thank you for your response.
However, I absolutely cannot launch Python 3...

Code: Select all

root@****wapt:/opt/wapt/bin# python3
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f62b4542740 (most recent call first):
Aborted

Re: Upgrade 2.0.0.9450

Published: August 16, 2021 - 4:45 PM
by sfonteneau
Does this work?

Code: Select all

/usr/bin/python3.7

Re: Upgrade 2.0.0.9450

Published: August 16, 2021 - 4:51 PM
by fck_mly
No, still the same error...
We had no problems during the migration from 1.8 to 2.0.

Re: Upgrade 2.0.0.9450

Published: August 16, 2021 - 5:37 PM
by sfonteneau
Wapt doesn't use Python; we use a virtual environment, so it's surprising:

In this case, it's the local Python installation on your machine that's no longer working:

In your export, do you have any references to Python?

Code: Select all

export|grep -i python
https://openclassrooms.com/forum/sujet/erreur-dencoding

[SOLVED] Re: upgrade 2.0.0.9450

Published: August 17, 2021 - 12:21
by fck_mly
Hello,
thanks for the tip.
After making some mistakes, restoring the hosted VM, uninstalling and then reinstalling Python, the upgrade worked, although I'm still getting the same Python error...
Anyway, the migration to version 9450 is OK.

Have a good day.