Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when song is changing #9

Open
PoSayDone opened this issue Nov 7, 2020 · 0 comments
Open

Crash when song is changing #9

PoSayDone opened this issue Nov 7, 2020 · 0 comments

Comments

@PoSayDone
Copy link

PoSayDone commented Nov 7, 2020

I've changed some code in utils.py and in spotify_lyrics.py because I dont want to get metadata and lyrcis. I need only artwork. Maybe I broke something
Here is the changes:
utils.py

def fetch_lyrics(artist, title):
    final_lyrics = ('')
    return final_lyrics

spotify_lyrics.py

    def print_metadata(self):
        self.changed = True
        os.system('clear')
        utils.move_cursor(0, 0)
        print()
        print()
        print()
 album_cover = canvas.create_placement(
            'album_cover',
            x=4, y=9,
            width=28,
            height=28,
            )
        album_cover.path = self.image_file
        album_cover.visibility = ueberzug.Visibility.VISIBLE

Error:

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.8/site-packages/ueberzug/lib/v0/__init__.py", line 367, in decorator return function(*args, canvas=self, **kwargs) File "/home/posaydone/.local/lib/python3.8/site-packages/spotify_lyrics.py", line 126, in main song, artist, album, art_url = self.spotify.metadata() File "/home/posaydone/.local/lib/python3.8/site-packages/utils.py", line 73, in metadata title = metadata['xesam:title'].replace("&", "&") KeyError: 'xesam:title'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant