I don’t quite know how to do what you’re asking, but here’s my attempt.
I scattered some print(“Max Depth is:” len(inspect.stack(0))) around the code, but the only thing it ever said was “1”. Here’s the specific error again, with those additional lines:
[(x9*x11)^2, x3*x1*x8, x5*x6*x7, x11*x13*x12, x10*x0*x7^2, x3*x7*x8, x8*x2, x5*x13, x0*x10*x0, x11*x13*x4*x0, x10*x5, x11*x10*x8*x5] Finitely presented group < x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14 | (x9*x11)^2, x3*x1*x8, x5*x6*x7, x11*x13*x12, x10*x0*x7^2, x3*x7*x8, x8*x2, x5*x13, x0*x10*x0, x11*x13*x4*x0, x10*x5, x11*x10*x8*x5 >
Max Depth is: 1
Some Unhandled exception!
Max Depth is: 1
Group Type is: F4
40 [[10, 4, 1, 7], [9, 1, 7, 11], [11], [13, 9, 14, 9], [7, 7, 13], [13, 2, 7, 5], [1, 9, 14, 10], [3, 1], [4, 9, 11], [2, 14, 8], [6, 4], [10, 14]]
Max Depth is: 1
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sage/groups/free_group.py", line 878, in _element_constructor_
P = x.parent()
AttributeError: 'list' object has no attribute 'parent'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cduston/Dropbox/Research/LQG/TopStatesSage/MWE-stacksize.sage.py", line 42, in <module>
Y1=[H(Y[i]) for i in range(g*V)]
File "/home/cduston/Dropbox/Research/LQG/TopStatesSage/MWE-stacksize.sage.py", line 42, in <listcomp>
Y1=[H(Y[i]) for i in range(g*V)]
File "sage/structure/parent.pyx", line 898, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9458)
File "sage/structure/coerce_maps.pyx", line 156, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4627)
File "/usr/lib/python3/dist-packages/sage/groups/free_group.py", line 880, in _element_constructor_
return self.element_class(self, x, **kwds)
File "/usr/lib/python3/dist-packages/sage/groups/free_group.py", line 229, in __init__
AbstractWordTietzeWord = libgap.eval('AbstractWordTietzeWord')
File "sage/libs/gap/libgap.pyx", line 400, in sage.libs.gap.libgap.Gap.eval (build/cythonized/sage/libs/gap/libgap.c:4365)
File "sage/libs/gap/util.pyx", line 388, in sage.libs.gap.util.gap_eval (build/cythonized/sage/libs/gap/util.c:6054)
cysignals.signals.SignalError: Segmentation fault
Is that close to what you wanted, or can gdb give us more information?
The only thing I notice is that it seems to be hitting my “other exception” case (which was just a call to except: with no further conditions), tries to continue, and fails. But I “pass” out of that back to beginning of the loop, so I’m not sure why a redefinition of the variables (definitions that worked before) would now cause some kind of type error.