Jugran / lyrics-in-terminal

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

Curses 2.2 does not have A_ITALIC #3

Closed CobraCoral closed 4 years ago

CobraCoral commented 4 years ago

I am using:

and when I try to run lyrics, the following error happens: $> lyrics Traceback (most recent call last):   File "/home/fcavalcanti/.local/bin/lyrics", line 8, in     sys.exit(start())   File "/home/fcavalcanti/.local/lib/python3.6/site-packages/lyrics/lyrics_in_terminal.py", line 162, in start     curses.wrapper(main, player_name, align=1)   File "/usr/lib/python3.6/curses/init.py", line 94, in wrapper     return func(stdscr, *args, **kwds)   File "/home/fcavalcanti/.local/lib/python3.6/site-packages/lyrics/lyrics_in_terminal.py", line 146, in main     win = Window(stdscr, player, timeout=2000)   File "/home/fcavalcanti/.local/lib/python3.6/site-packages/lyrics/lyrics_in_terminal.py", line 21, in init     self.set_up()   File "/home/fcavalcanti/.local/lib/python3.6/site-packages/lyrics/lyrics_in_terminal.py", line 30, in set_up     self.set_titlebar()   File "/home/fcavalcanti/.local/lib/python3.6/site-packages/lyrics/lyrics_in_terminal.py", line 43, in set_titlebar     self.stdscr.addstr(2, 1, track_info[2], curses.A_REVERSE | curses.A_ITALIC) AttributeError: module 'curses' has no attribute 'A_ITALIC'

Jugran commented 4 years ago

'A_ITALIC' support was added in Python 3.7.

I am removing italics font all together as it doesn't provide much visually. PyPi will be updated later.

Till then try to install script from source.

git clone https://github.com/Jugran/lyrics-in-terminal.git
cd lyrics-in-terminal
python setup.py install --user