I can tell you something about where it came from.

 When I look at sage/local/lib/python3.14/site-packages/sage/config.py I 
see:




*# The semicolon-separated list of GAP root paths. This is the list of# 
locations that are searched for GAP packages. This is passed directly# to 
GAP via the -l flag.GAP_ROOT_PATHS = 
"ESC[?1034h/var/tmp/sage-10.9/local/lib/gap/;/var/tmp/sage-10.9/local/share/gap/".replace("${prefix}",
 
SAGE_LOCAL)*

The file config.py is generated from sage/src/sage/config.py.in, which 
contains:




*# The semicolon-separated list of GAP root paths. This is the list of# 
locations that are searched for GAP packages. This is passed directly# to 
GAP via the -l flag.GAP_ROOT_PATHS = 
"@GAP_ROOT_PATHS@".replace("${prefix}", SAGE_LOCAL)*

So it would seem that some m4 file is inserting the "enable 8 bit meta" 
escape sequence into @GAP_ROOT_PATHS@ for my enjoyment and entertainment.

Also, when I remove that escape sequence from config.py, guess what?

sage: gap.FreeGroup(3)
Group( [ f1, f2, f3 ] )

- Marc



On Monday, March 2, 2026 at 11:35:18 PM UTC-6 [email protected] wrote:

> "\033[?1034h/var/tmp/sage-10.9/local/lib/gap/" is certainly looking bad, 
> and probably is the root of the problem.
>
> No idea where it came from.
>
>
>
> On Mon, Mar 2, 2026 at 9:52 PM Marc Culler <[email protected]> wrote:
>
>> I deleted .sage/gap and tried again.  No change.
>>
>> I also tried 
>>    sage: libgap.eval('F:= FreeGroup(3)')
>> That produces the same GAPError, but there was some other stuff printed 
>> before the traceback which might provide a clue:
>>
>> #I  gapdoc package is not available. Check that the name is correct
>> #I  and it is present in one of the GAP root directories (see 
>> '??RootPaths')
>> #I  GAP: needed package gapdoc cannot be loaded
>> Error, failed to load needed package `gapdoc' (version >= 1.2)
>> Syntax warning: Unbound global variable in 
>> /var/tmp/sage-10.9/local/share/gap/l\
>> ib/init.g:728
>>     ColorPrompt( UserPreference( "UseColorPrompt" ) );
>>     ^^^^^^^^^^^
>> Error, SetGasmanMessageStatus: function is not yet defined
>> Error, Variable: 'L1_IMMUTABLE_ERROR' must have a value
>> Error, Variable: 'ColorPrompt' must have a value
>>
>> I did find  some other suspicious stuff:
>>
>> sage: libgap.eval('GAPInfo.RootPaths')
>> [ "/home/culler/.gap/", "\033[?1034h/var/tmp/sage-10.9/local/lib/gap/", 
>> "/var/tmp/sage-10.9/local/share/gap/" ]
>>
>> The last path contains an empty pkg directory.  The real pkg directory is 
>> in $SAGE_ROOT/local/lib/gap.  But I doubt that the second path would work 
>> correctly when it has all of those ANSI escape sequences in front of it.  
>> Adding a symlink /var/tmp/sage-10.9/local/share/gap/pkg -> 
>> ../../lib/gap/pkg did not help.  But maybe putting ANSI escape sequences in 
>> a root path makes GAP crash.
>>
>> - Marc
>>
>>
>> - Marc
>>
>> On Mon, Mar 2, 2026 at 9:13 PM Dima Pasechnik <[email protected]> wrote:
>>
>>> The usual suspects for strange GAP errors are stale GAP workspaces (or 
>>> related to them errors). Make sure you don't have any (typically in 
>>> ~/.sage/, although your setup might have a different location of .sage/)
>>>
>>>
>>>
>>> On March 2, 2026 4:37:34 PM CST, Marc Culler <[email protected]> wrote:
>>>
>>>>
>>>>
>>>> On Monday, March 2, 2026 at 3:32:23 PM UTC-6 [email protected] wrote:
>>>>  
>>>>
>>>> That's a problem with the pexpect GAP. Does 
>>>>
>>>>     sage: libgap.FreeGroup(3) 
>>>>
>>>> work?
>>>>
>>>>
>>>> No.  I don't get a RuntimeError (which I think is produced by pexpect) 
>>>> but I get:
>>>>
>>>> GAPError: Error, FreeGroup: function is not yet defined
>>>>
>>>> Does
>>>>
>>>>    ./sage -t src/sage/features/gap.py 
>>>>
>>>> pass?
>>>>
>>>>
>>>> Yes. I get:
>>>>
>>>> Doctesting 1 file.
>>>> sage/src/bin/sage -t --warn-long 5.0 
>>>> --random-seed=206062923921806203470542245493080431476 
>>>> sage/src/sage/features/gap.py
>>>>     [5 tests, 0.01s wall]
>>>> ----------------------------------------------------------------------
>>>> All tests passed!
>>>> ----------------------------------------------------------------------
>>>> Total time for all tests: 0.2 seconds
>>>>     cpu time: 0.0 seconds
>>>>     cumulative wall time: 0.0 seconds
>>>> Features detected for doctesting: 
>>>>
>>>> - Marc
>>>>
>>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "sage-devel" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/sage-devel/dVVleHx0xP0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected].
>>> To view this discussion visit 
>>> https://groups.google.com/d/msgid/sage-devel/B04DFD67-0325-4949-A30C-4D2A1AD9F7EE%40gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/sage-devel/B04DFD67-0325-4949-A30C-4D2A1AD9F7EE%40gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>>
> 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 [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/sage-devel/CALcZXRHNSvqL8Vi8v3fQLoOroBbi%2BXB%2B%2BSMgV8doMzU7DhLUeQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/sage-devel/CALcZXRHNSvqL8Vi8v3fQLoOroBbi%2BXB%2B%2BSMgV8doMzU7DhLUeQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/3a9b9015-d971-4472-9d0b-2128015a2f42n%40googlegroups.com.

Reply via email to