Here is a partial traceback
 As you can see, this comes from asking about the terminal width..
 ----> 6         print(self.p._unicode_art_())
~/sage/local/lib/python3.9/site-packages/sage/structure/sage_object.pyx in sage.structure.sage_object.SageObject.__repr__ (build/cythonized/sage/structure/sage_object.c:2558)()
    192         except AttributeError:
    193             return super().__repr__()
--> 194         result = reprfunc()
    195         if isinstance(result, str):
    196             return result
~/sage/local/lib/python3.9/site-packages/sage/typeset/character_art.py in _repr_(self)
    153             hsize = MAX_WIDTH
    154         else:
--> 155             hsize = self._terminal_width()
    156         # if the draw is larger than the max length, try to split it
    157         if hsize <= self._l and self._breakpoints:
~/sage/local/lib/python3.9/site-packages/sage/typeset/character_art.py in _terminal_width(self)
    281         import termios
    282         import struct
--> 283         rc = fcntl.ioctl(int(0), termios.TIOCGWINSZ,
    284                          struct.pack('HHHH', sys.stdout.fileno(), 0, 0, 0))
    285         h, w, hp, wp = struct.unpack('HHHH', rc)
OSError: [Errno 25] Inappropriate ioctl for device
   
unicode art is made for the terminal. For jupyter, we may need to use something from https://ipython.readthedocs.io/en/sta...
%display latexis more appropriate for the Jupyter notebook --- well, not forPartitions(5).list()...