Jugran / lyrics-in-terminal

Python curses application to view lyrics of current playing song in terminal.
MIT License
241 stars 19 forks source link

Help causes crash? #6

Closed jhilker98 closed 3 years ago

jhilker98 commented 4 years ago

Hi there, I'm on Ubuntu 18.04 with conda and any time I try to use the help function I get an error. I installed this from pip, and here's the output I get:

Traceback (most recent call last):
  File "/home/jhilker/anaconda3/bin/lyrics", line 33, in <module>
    sys.exit(load_entry_point('lyrics-in-terminal==1.2.1', 'console_scripts', 'lyrics')())
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/lyrics_in_terminal.py", line 39, in start
    curses.wrapper(main)
  File "/home/jhilker/anaconda3/lib/python3.7/curses/__init__.py", line 102, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/lyrics_in_terminal.py", line 36, in main
    win.main()
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/window.py", line 214, in main
    self.keys.input(self, key)
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/window.py", line 57, in input
    HelpPage(self.binds)
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/window.py", line 68, in __init__
    self.add_text()
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/window.py", line 101, in add_text
    i = self.add_config(i, j, self.keybinds, keys)
  File "/home/jhilker/.local/lib/python3.7/site-packages/lyrics/window.py", line 80, in add_config
    self.win.addstr(i, j, f'{k:15} {v}')
_curses.error: addwstr() returned ERR

What exactly caused this crash, and what exactly can I do to fix it?

Jugran commented 3 years ago

This usually happens when the window is resized to a smaller dimension than the text to be displayed.

Try reducing the size of terminal font, it should fix that.

jhilker98 commented 3 years ago

yeah, I think that was what I had found. Thanks!