Waldek,

I cannot believe that suppression of certain output is their problem.
Otherwise, it should be possible to extract some code from jfricas in order to mark the various output types and do separate things with them just as I do in jfricas.

The reason seems to be that the connection sage <--> fricas seems to be broken with the fricas debian package that lives on GCL.

Maybe I haven't yet understood their real problem, but I can reproduce

that

sage: fricas('3')

leads to (see attachment) on xubuntu 22.04.

I very much believe that it is /usr/lib/python3/dist-packages/sage/interfaces/fricas.py where the problem is to be located, because

sage: fricas_console()

seems to work fine with GCL.

However, why fricas.py would behave differently with GCL in contrast to SBCL, is a mystery for me. I somehow fear that it is a problem with the expect function and the fricas.py script not understanding what comes back from FriCAS (in the GCL case). It would probably be worthwhile to test whether fricas.py receives the same in SBCL vs. GCL case.

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" 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/fricas-devel/3e58abc2-d21a-4f2a-a286-dd7177d8ce38%40hemmecke.org.
diamond:~>fricas --version
FriCAS 1.3.7
based on gcl 2.6.12

diamond:~>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5, Release Date: 2022-01-30                     │
│ Using Python 3.10.4. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: fricas('3')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/usr/lib/python3/dist-packages/sage/interfaces/expect.py in __init__(self, 
parent, value, is_name, name)
   1469             try:
-> 1470                 self._name = parent._create(value, name=name)
   1471             # Convert ValueError and RuntimeError to TypeError for

/usr/lib/python3/dist-packages/sage/interfaces/interface.py in _create(self, 
value, name)
    512         name = self._next_var_name() if name is None else name
--> 513         self.set(name, value)
    514         return name

/usr/lib/python3/dist-packages/sage/interfaces/fricas.py in set(self, var, 
value)
    674         output = self.eval(cmd, reformat=False)
--> 675         self._check_errors(value, output)
    676 

/usr/lib/python3/dist-packages/sage/interfaces/fricas.py in _check_errors(self, 
line, output)
    569                 output = output.replace(old, new)
--> 570             raise RuntimeError("An error occurred when FriCAS evaluated 
'%s':\n%s" % (line, output))
    571 

RuntimeError: An error occurred when FriCAS evaluated '3':
sage0:=3;
   Function declaration sageprint : InputForm -> String has been added to 
      workspace.


During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
<ipython-input-1-c65591fc1e1e> in <module>
----> 1 fricas('3')

/usr/lib/python3/dist-packages/sage/interfaces/interface.py in __call__(self, 
x, name)
    293 
    294         if isinstance(x, str):
--> 295             return cls(self, x, name=name)
    296         try:
    297             # Special methods do not and should not have an option to

/usr/lib/python3/dist-packages/sage/interfaces/expect.py in __init__(self, 
parent, value, is_name, name)
   1473             except (RuntimeError, ValueError) as x:
   1474                 self._session_number = -1
-> 1475                 raise TypeError(*x.args)
   1476             except BaseException:
   1477                 self._session_number = -1

TypeError: An error occurred when FriCAS evaluated '3':
sage0:=3;
   Function declaration sageprint : InputForm -> String has been added to 
      workspace.

Reply via email to