On Monday, February 4, 2019 at 8:12:02 AM UTC-6, Nathan Dunfield wrote:
>
> On Sunday, February 3, 2019 at 10:31:21 PM UTC-6, Dima Pasechnik wrote:
>>
>> I don't know what exactly is wrong with that docker container, but 
>> certainly GAP workspace might not be present if you never ran GAP via 
>> pexpect. It is created and rotated on the fly. 
>> Does 
>>
>> sage: gap_console() 
>>
>> work for you, just as a sanity check? 
>>
>
> Yes, that works just fine.
>

I figured out how to fix the issue on my Docker container, but it may be a 
general issue that will need a ticked and a fix.

The Docker container did not have any locale set (this is a common problem, 
apparently): 

sage@20cb4c8077bc:~$ python3 -c 'import locale; 
print(locale.getdefaultlocale())'
(None, None)
sage@20cb4c8077bc:~$ python3 -c 'import locale; 
print(locale.getpreferredencoding())'
ANSI_X3.4-1968

After doing:

export LANG=C.UTF-8

the answers change to ('en_US', 'UTF-8') and UTF-8 and then

sage: gap('0')

works! 

However, if instead I do:

sudo locale-gen en_US
export LANG=en_US

then Python gives ('en_US', 'ISO8859-1') and ISO-8859-1, and then 
"gap('0')" in Sage gives the same error as before.  My guess is that if the 
locale is not UTF-8 then GAP is printing its banner message in a non-UTF-8 
compatible encoding and then the pexpect interface is defaulting to trying 
to decode it as UTF-8 resulting in the error I found.

Should I open a ticket on this?  I tried logging into some random linux 
machines and got a whole range of responses for the locale...

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to