Bug 8141 - Traceback from sudo module in tl-setup
Summary: Traceback from sudo module in tl-setup
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Server Installer (show other bugs)
Version: 4.14.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.15.0
Assignee: Bugzilla mail exporter
URL:
Keywords: prosaic, samuel_tester
Depends on:
Blocks:
 
Reported: 2023-04-18 14:44 CEST by Frida
Modified: 2023-05-02 14:59 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Frida cendio 2023-04-18 14:44:02 CEST
On a system with locale set to cs_CZ.ISO-8859-2 I get the following traceback from the sudo-module in tl-setup:

> 2023-04-18 14:30:44,281: Traceback (most recent call last):
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 319, in <module>
> 2023-04-18 14:30:44,281:     oOoO00 ( )
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 275, in oOoO00
> 2023-04-18 14:30:44,281:     IiiI1III1iI = Iioo0Oo0oO0 . run ( )
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 110, in run
> 2023-04-18 14:30:44,281:     return self . _run_text ( )
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 128, in _run_text
> 2023-04-18 14:30:44,281:     iI1iI ( )
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/modules/thinlinc/tlsetup/sudo.py", line 31, in ii1Ii
> 2023-04-18 14:30:44,281:     wizard . text_print_wrapped ( ii )
> 2023-04-18 14:30:44,281:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 22, in text_print_wrapped
> 2023-04-18 14:30:44,281:     print ( textwrap . fill ( ii1iI1I , width ) )
> 2023-04-18 14:30:44,281:   File "/usr/lib/python3.10/encodings/iso8859_2.py", line 19, in encode
> 2023-04-18 14:30:44,281:     return codecs.charmap_encode(input,self.errors,encoding_table)[0]
> 2023-04-18 14:30:44,281: UnicodeEncodeError: 'charmap' codec can't encode character '\u2019' in position 83: character maps to <undefined>
Comment 2 Frida cendio 2023-04-18 14:54:19 CEST
This should now be fixed. The issue was that we had a unicode character in the output to the terminal that could not be encoded with ISO-8859-2. I change this character to an ascii-range equivalent.
Comment 3 Frida cendio 2023-04-26 10:53:23 CEST
Note that this should not have been a new bug, but rather a reopening of bug 7672.
Comment 4 Samuel Mannehed cendio 2023-05-02 14:59:59 CEST
I could reproduce the issue on Ubuntu 22.04 using build 3170 and a sv_SE.ISO-8859-1 locale:

> 2023-05-02 14:52:41,895: Traceback (most recent call last):
> 2023-05-02 14:52:41,895:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 319, in <module>
> 2023-05-02 14:52:41,895:     oOoO00 ( )
> 2023-05-02 14:52:41,895:   File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 275, in oOoO00
> 2023-05-02 14:52:41,895:     IiiI1III1iI = Iioo0Oo0oO0 . run ( )
> 2023-05-02 14:52:41,895:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 110, in run
> 2023-05-02 14:52:41,895:     return self . _run_text ( )
> 2023-05-02 14:52:41,895:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 128, in _run_text
> 2023-05-02 14:52:41,895:     iI1iI ( )
> 2023-05-02 14:52:41,896:   File "/opt/thinlinc/modules/thinlinc/tlsetup/sudo.py", line 31, in ii1Ii
> 2023-05-02 14:52:41,896:     wizard . text_print_wrapped ( ii )
> 2023-05-02 14:52:41,896:   File "/opt/thinlinc/modules/thinlinc/wizard.py", line 22, in text_print_wrapped
> 2023-05-02 14:52:41,896:     print ( textwrap . fill ( ii1iI1I , width ) )
> 2023-05-02 14:52:41,896: UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 83: ordinal not in range(256)

I did the following to configure that locale:

> sudo apt install -y locales
> sudo dpkg-reconfigure locales
> export LC_ALL=sv_SE.ISO-8859-1
> export LANG=sv_SE.ISO-8859-1
> export LANGUAGE=sv_SE.ISO-8859-1

I could then verify that things work well on the same machine with the same locale when instead using build 3229.

Note You need to log in before you can comment on or make changes to this bug.