You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While stopping/starting a module, the rich library raises a UnicodeEncodeError, see below :
***********************************
***** STOPPING MFDATA *****
***********************************
- Uninstalling module crontab... [ OK ]
- Scheduling stop of nginx [ ERROR ]
Traceback (most recent call last):
File "/opt/metwork-mfext-1.2/bin/_circus_schedule_stop_watcher.py", line 17, in <module>
client.stop_watcher(name=name)
File "/opt/metwork-mfext-1.2/lib/mfext/circus.py", line 102, in stop_watcher
t = progress.add_task(txt, total=timeout)
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/rich/progress.py", line 668, in add_task
self.refresh()
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/mfutil/cli.py", line 401, in refresh
return Progress.refresh(self, *args, **kwargs)
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/rich/progress.py", line 588, in refresh
self.console.print(self._live_render)
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/rich/console.py", line 346, in __exit__
self._exit_buffer()
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/rich/console.py", line 337, in _exit_buffer
self._check_buffer()
File "/opt/metwork-mfext-1.2/opt/python3/lib/python3.9/site-packages/rich/console.py", line 834, in _check_buffer
self.file.write(text)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 62-73: ordinal not in range(256)
to avoid any regression, maybe it's better to add export PYTHONIOENCODING=utf-8 at the very beginning of mfxxx.start/stop/init/status script in mfext adm/templates
version : Metwork 1.2
OS : CentOS 6.10
While stopping/starting a module, the rich library raises a
UnicodeEncodeError
, see below :standard output encoding is not utf-8 :
when encoding is not set along with the locale :
In the home dir (~) of the module, execute :
and reload the module.
PYTHONIOENCODING=utf-8
in the environment variables of the module(s)The text was updated successfully, but these errors were encountered: