Playing an album from flac+cue files breaks notifications
dmlemos opened this issue · comments
Diogo Lemos commented
The error is because the file is trying to reach is not found:
ERROR:root:Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/mutagen/_util.py", line 235, in _openfile
fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: "cue:///Users/yyy/Music/08 A Collection Of Beatles Oldies (UK Mono)/The Beatles - A Collection Of Beatles Oldies (UK Mono).cue/8"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/yyy/.cmus/cmus-osx/notify.py", line 97, in <module>
file = File(status["file"])
File "/usr/local/lib/python3.7/site-packages/mutagen/_util.py", line 147, in wrapper_func
writable, create) as h:
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.7/site-packages/mutagen/_util.py", line 256, in _openfile
raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: "cue:///Users/yyy/Music/08 A Collection Of Beatles Oldies (UK Mono)/The Beatles - A Collection Of Beatles Oldies (UK Mono).cue/8"
It doesn't happen when playing flac files by themselves.
Philip Trauner commented
Added a conditional that should prevent the crash 🙂