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
If you select a figlet font which is not available on your system, you get an ugly error from pyfiglet. This should probably be caught and replaced with a more user friendly error message.
Example:
# termdown 2m -f mono12
Traceback (most recent call last):
File "/usr/bin/termdown", line 8, in<module>sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/termdown.py", line 800, in main
curses.wrapper(countdown, **kwargs)
File "/usr/lib/python3.11/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/termdown.py", line 160, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/termdown.py", line 313, in countdown
figlet = Figlet(font=font)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pyfiglet/__init__.py", line 862, in __init__
self.setFont()
File "/usr/lib/python3.11/site-packages/pyfiglet/__init__.py", line 869, in setFont
self.Font = FigletFont(font=self.font)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pyfiglet/__init__.py", line 128, in __init__
self.data = self.preloadFont(font)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pyfiglet/__init__.py", line 168, in preloadFont
raise FontNotFound(font)
pyfiglet.FontNotFound: mono12
The text was updated successfully, but these errors were encountered:
If you select a figlet font which is not available on your system, you get an ugly error from pyfiglet. This should probably be caught and replaced with a more user friendly error message.
Example:
The text was updated successfully, but these errors were encountered: