Yes, you are right, it is "ECL says: Memory limit reached." I have to find out why Python exception in my program printed "Exception raised: AttributeError"
>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.1, Release Date: 2023-08-20 │
│ Using Python 3.11.3. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
sage: var('x a b c')
(x, a, b, c)
sage: integrate(1/(x-(a*x+b)^(1/2)*(c+(a*x+b)^(1/2))^(1/2)),x, algorithm="fricas")
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:748, in InterfaceElement.__init__(self, parent, value, is_name, name)
747 try:
--> 748 self._name = parent._create(value, name=name)
749 except (TypeError, RuntimeError, ValueError) as x:
File ~/TMP/sage-10.1/src/sage/interfaces/maxima_lib.py:621, in MaximaLib._create(self, value, name)
620 else:
--> 621 self.set(name, value)
622 except RuntimeError as error:
File ~/TMP/sage-10.1/src/sage/interfaces/maxima_lib.py:529, in MaximaLib.set(self, var, value)
528 cmd = '%s : %s$'%(var, value.rstrip(';'))
--> 529 self.eval(cmd)
File ~/TMP/sage-10.1/src/sage/interfaces/maxima_lib.py:475, in MaximaLib._eval_line(self, line, locals, reformat, **kwds)
474 if statement:
--> 475 maxima_eval("#$%s$" % statement)
476 if not reformat:
File ~/TMP/sage-10.1/src/sage/libs/ecl.pyx:830, in sage.libs.ecl.EclObject.__call__()
829 lispargs = EclObject(list(args))
--> 830 return ecl_wrap(ecl_safe_apply(self.obj,(<EclObject>lispargs).obj))
831
File ~/TMP/sage-10.1/src/sage/libs/ecl.pyx:353, in sage.libs.ecl.ecl_safe_apply()
352 else:
--> 353 raise RuntimeError("ECL says: {}".format(message))
354 else:
RuntimeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the
memory limits before executing the program again.
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
Cell In [2], line 1
----> 1 integrate(Integer(1)/(x-(a*x+b)**(Integer(1)/Integer(2))*(c+(a*x+b)**(Integer(1)/Integer(2)))**(Integer(1)/Integer(2))),x, algorithm="fricas")
File ~/TMP/sage-10.1/src/sage/misc/functional.py:773, in integral(x, *args, **kwds)
648 """
649 Return an indefinite or definite integral of an object ``x``.
650
(...)
770
771 """
772 if hasattr(x, 'integral'):
--> 773 return x.integral(*args, **kwds)
774 else:
775 from sage.symbolic.ring import SR
File ~/TMP/sage-10.1/src/sage/symbolic/expression.pyx:13283, in sage.symbolic.expression.Expression.integral()
13281 R = SR
13282 return R(integral(f, v, a, b, **kwds))
> 13283 return integral(self, *args, **kwds)
13284
13285 integrate = integral
File ~/TMP/sage-10.1/src/sage/symbolic/integration/integral.py:1062, in integrate(expression, v, a, b, algorithm, hold)
1060 if not integrator:
1061 raise ValueError("Unknown algorithm: %s" % algorithm)
-> 1062 return integrator(expression, v, a, b)
1063 if a is None:
1064 return indefinite_integral(expression, v, hold=hold)
File ~/TMP/sage-10.1/src/sage/symbolic/integration/external.py:206, in fricas_integrator(expression, v, a, b, noPole)
203 else:
204 result = e_fricas.integrate(seg)
--> 206 result = result.sage()
208 if result == "failed":
209 result = expression.integrate(v, a, b, hold=True)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:1121, in InterfaceElement.sage(self, *args, **kwds)
1102 def sage(self, *args, **kwds):
1103 """
1104 Attempt to return a Sage version of this object.
1105
(...)
1119 [0 0]
1120 """
-> 1121 return self._sage_(*args, **kwds)
File ~/TMP/sage-10.1/src/sage/interfaces/fricas.py:2051, in FriCASElement._sage_(self)
2046 return FriCASElement._sage_expression(P.get_InputForm(self._name))
2048 if head == "Expression" or head == "Pi":
2049 # we treat Expression Integer and Expression Complex
2050 # Integer just the same
-> 2051 return FriCASElement._sage_expression(P.get_InputForm(self._name))
2053 if head == 'DistributedMultivariatePolynomial':
2054 base_ring = self._get_sage_type(domain[2])
File ~/TMP/sage-10.1/src/sage/interfaces/fricas.py:1754, in FriCASElement._sage_expression(fricas_InputForm)
1749 del rootOf[var]
1750 if evars:
1751 # we just need any root per FriCAS specification -
1752 # however, if there are extra variables, we cannot
1753 # use QQbar.any_root
-> 1754 rootOf_ev[var] = poly.roots(var, multiplicities=False)[0]
1755 else:
1756 R = PolynomialRing(QQbar, "x")
File ~/TMP/sage-10.1/src/sage/symbolic/expression.pyx:12332, in sage.symbolic.expression.Expression.roots()
12330 return p.roots(ring=ring, multiplicities=multiplicities)
12331
> 12332 S, mul = self.solve(x, multiplicities=True, explicit_solutions=explicit_solutions)
12333 if len(mul) == 0 and explicit_solutions:
12334 raise RuntimeError("no explicit roots found")
File ~/TMP/sage-10.1/src/sage/symbolic/expression.pyx:12399, in sage.symbolic.expression.Expression.solve()
12397 """
12398 from sage.symbolic.relation import solve
> 12399 return solve(self, x, multiplicities=multiplicities,
12400 solution_dict=solution_dict,
12401 explicit_solutions=explicit_solutions,
File ~/TMP/sage-10.1/src/sage/symbolic/relation.py:1068, in solve(f, *args, **kwds)
1063 raise TypeError("The first argument to solve() should be a "
1064 "symbolic expression or a list of symbolic "
1065 "expressions.")
1067 if isinstance(f, Expression): # f is a single expression
-> 1068 return _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
1070 if not isinstance(f, (list, tuple)):
1071 raise TypeError("The first argument must be a symbolic expression or a list of symbolic expressions.")
File ~/TMP/sage-10.1/src/sage/symbolic/relation.py:1338, in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
1336 try:
1337 if to_poly_solve != 'force':
-> 1338 s = m.solve(x).str()
1339 else: # omit Maxima's solve command
1340 s = str([])
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:696, in InterfaceFunctionElement.__call__(self, *args, **kwds)
695 def __call__(self, *args, **kwds):
--> 696 return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:616, in Interface.function_call(self, function, args, kwds)
612 self._check_valid_function_name(function)
613 s = self._function_call_string(function,
614 [
s.name() for s in args],
615 ['%s=%s'%(key,
value.name()) for key, value in kwds.items()])
--> 616 return
self.new(s)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:385, in Interface.new(self, code)
384 def new(self, code):
--> 385 return self(code)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:298, in Interface.__call__(self, x, name)
295 pass
297 if isinstance(x, str):
--> 298 return cls(self, x, name=name)
299 try:
300 # Special methods do not and should not have an option to
301 # set the name directly, as the identifier assigned by the
302 # interface should stay consistent. An identifier with a
303 # user-assigned name might change its value, so we return a
304 # new element.
305 result = self._coerce_from_special_method(x)
File ~/TMP/sage-10.1/src/sage/interfaces/interface.py:750, in InterfaceElement.__init__(self, parent, value, is_name, name)
748 self._name = parent._create(value, name=name)
749 except (TypeError, RuntimeError, ValueError) as x:
--> 750 raise TypeError(x)
TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the
memory limits before executing the program again.
sage: