You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With sagemath 10.4 installed using the 3-manifolds binary, with pwntools installed using %pip install pwntools in a sage shell
Create a .sage file containing import pwn
Run this file in a terminal, e.g in macOS Terminal
I get the following error : File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 34, in _get_term_color_support curses.setupterm() _curses.error: setupterm: could not find terminfo database(see below for full trace)
Expected Behavior
Expecting the import to work correctly
Actual Behavior
I get the following error :
$ sage ~/test.sage
Warning: _curses.error: setupterm: could not find terminfo database
Terminal features will not be available. Consider setting TERM variable to your current terminal name (or xterm).
Traceback (most recent call last):
File "/Users/gjazeron/Documents/cryptohack/bespoke_padding.sage.py", line 7, in <module>
import pwn
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/pwn/__init__.py", line 4, in <module>
from pwn.toplevel import *
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/pwn/toplevel.py", line 92, in <module>
colored_traceback.add_hook()
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 78, in add_hook
colorizer = Colorizer(style, colors, debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 64, in __init__
self.formatter = _determine_formatter(style, colors, debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 38, in _determine_formatter
colors = colors or _get_term_color_support()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 34, in _get_term_color_support
curses.setupterm()
_curses.error: setupterm: could not find terminfo database
With test.sage being composed of the only line import pwn
Additional Information
I've tried setting the TERM and TERMINFO environment variables, with no success.
After discussing a bit with the maintainer of 3-manifolds MacOS sage project (discussion here) we figured out the issue comes from the following lines in the /venv/bin/sage script
unset TERM # See Issue #12263
# sage-run rejects all command line options as the first argument.
exec sage-run "$@"
Steps To Reproduce
import pwn
File "/Users/gjazeron/Library/SageMath-10-4/lib/python3.12/site-packages/colored_traceback/colored_traceback.py", line 34, in _get_term_color_support curses.setupterm() _curses.error: setupterm: could not find terminfo database
(see below for full trace)Expected Behavior
Expecting the import to work correctly
Actual Behavior
I get the following error :
With test.sage being composed of the only line
import pwn
Additional Information
I've tried setting the TERM and TERMINFO environment variables, with no success.
After discussing a bit with the maintainer of 3-manifolds MacOS sage project (discussion here) we figured out the issue comes from the following lines in the
/venv/bin/sage
scriptWhich is related to issue Issue #12263.
And so even if I set TERM env variable back, it doesn't work.
Environment
Checklist
The text was updated successfully, but these errors were encountered: