On 28/01/2024 21:00, 'Bjoern Franke' via pywws wrote:
>
> the MicroSD of the Pi2 running pywws for years unfortunately died. So I
> reinstalled Archlinux Arm on a new MicroSD and took /var/lib/pywws from
> the fortunately existing backups.
>
> But pywws does not start:
>
> Jan 28 20:52:56 fh19 pywws-livelog[1101]: File
> "/usr/lib/python3.11/site-packages/pywws/localisation.py", line 200, in
> set_translation
> Jan 28 20:52:56 fh19 pywws-livelog[1101]: translation =
> gettext.translation(
> Jan 28 20:52:56 fh19 pywws-livelog[1101]: ^^^^^^^^^^^^^^^^^^^^
> Jan 28 20:52:56 fh19 pywws-livelog[1101]: TypeError: translation() got
> an unexpected keyword argument 'codeset'
The 'codeset' parameter of gettext.translation has been removed in
Python 3.11
https://docs.python.org/3.11/library/gettext.html#class-based-api
Every computer capable of running pywws should be using utf-8 these
days, so it's probably safe to assume codeset is always utf-8, but make
sure all your templates are utf-8 coded.
Edit pywws/localisation.py and change lines 58-59 from
translation = gettext.translation(
'pywws', path, languages=langs, codeset=codeset)
to
translation = gettext.translation(
'pywws', path, languages=langs)
(Sorry about previous truncated message. Got sent prematurely.)