From 7df402b006875b0254a72c01f3116331ba86f673 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 21 Apr 2019 18:56:11 +1000 Subject: [PATCH] catch full mpv request queue presumably happening if multiple requests are sent before previous response fetch times out Caught exception: File "aqt/webview.py", line 314, in handler File "aqt/editor.py", line 351, in File "aqt/addcards.py", line 225, in afterSave File "aqt/addcards.py", line 231, in doClose File "aqt/addcards.py", line 210, in _reject File "anki/sound.py", line 417, in clearAudioQueue File "anki/sound.py", line 117, in clearQueue File "anki/mpv.py", line 558, in command File "anki/mpv.py", line 352, in _send_request File "anki/mpv.py", line 311, in _send_message : unable to put request --- anki/mpv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/mpv.py b/anki/mpv.py index 75460cc48..61580224a 100644 --- a/anki/mpv.py +++ b/anki/mpv.py @@ -349,8 +349,8 @@ class MPVBase: """Send a command to the mpv process and collect the result. """ self.ensure_running() - self._send_message(message, timeout) try: + self._send_message(message, timeout) return self._get_response(timeout) except MPVCommandError as e: raise MPVCommandError("%r: %s" % (message["command"], e))