From cc4a46127d66c5f6b3e4f3bdf52c3eb2ecd86616 Mon Sep 17 00:00:00 2001 From: Crussader <75786691+Crussader@users.noreply.github.com> Date: Wed, 30 Mar 2022 10:21:30 +0400 Subject: [PATCH] fixed an issue the list comprehension could raise `RuntimeError` so i put try and except. --- pomice/spotify/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pomice/spotify/client.py b/pomice/spotify/client.py index 608255d..7d5d616 100644 --- a/pomice/spotify/client.py +++ b/pomice/spotify/client.py @@ -107,7 +107,11 @@ class Client: except TimeoutError: # dont know why it TimeoutError simply happens # but if it does then manually waiting for each func - [await func for func in processes] + for process in processes: + try: + await process + except RuntimeError: + continue # tracks are jumbled for huge playlists so we use this to sort it out tracks.sort(key=lambda i: False if isinstance(i, Track) else i[0])