whipper-team / whipper

Python CD-DA ripper preferring accuracy over speed
GNU General Public License v3.0
1.15k stars 91 forks source link

`FileNotFoundError` when using `whipper cd rip` #594

Open SpecialBomb opened 1 year ago

SpecialBomb commented 1 year ago

This applies to whipper version 0.10.0 within a Void Linux environment. Whipper was obtained from the official Void package repository.

when using whipper cd rip, I appear to get an error regarding not being able to find a runtime directory that whipper generates in /tmp. I don't know what might be causing this. Here is an example of the output generated by the error:

[quen@slim:/tmp]$ whipper cd rip
INFO:whipper.command.cd:using configured read offset 6
INFO:whipper.command.cd:checking device /dev/sr0
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/whipper/extern/task/task.py", line 523, in c
    callable_task(*args, **kwargs)
  File "/usr/lib/python3.11/site-packages/whipper/program/cdrdao.py", line 115, in _read
    self._done()
  File "/usr/lib/python3.11/site-packages/whipper/program/cdrdao.py", line 153, in _done
    self.toc.parse()
  File "/usr/lib/python3.11/site-packages/whipper/image/toc.py", line 202, in parse
    with open(self._path) as f:
         ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuk9r8ic8.cdrdao.read-toc.whipper.task'
CRITICAL:whipper.command.main:exception FileNotFoundError at /usr/lib/python3.11/site-packages/whipper/image/toc.py:202: parse(): [Errno 2] No such file or directory: '/tmp/tmpuk9r8ic8.cdrdao.read-toc.whipper.task'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/whipper/extern/task/task.py", line 523, in c
    callable_task(*args, **kwargs)
  File "/usr/lib/python3.11/site-packages/whipper/program/cdrdao.py", line 115, in _read
    self._done()
  File "/usr/lib/python3.11/site-packages/whipper/program/cdrdao.py", line 153, in _done
    self.toc.parse()
  File "/usr/lib/python3.11/site-packages/whipper/image/toc.py", line 202, in parse
    with open(self._path) as f:
         ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuk9r8ic8.cdrdao.read-toc.whipper.task'

Absolutely no clue why this is happening. I thought maybe for some reason my /tmp/ directory had restricted permissions, but they are completely normal. What could be going on here?

github-actions[bot] commented 1 year ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing instructions.

Thra11 commented 1 year ago

I got the same error running whipper on NixOS. Downgrading cdrdao from 1.2.5 to 1.2.4 fixed the issue for me, so this may be a subtle variation on https://github.com/whipper-team/whipper/issues/591.

SpecialBomb commented 1 year ago

I got the same error running whipper on NixOS. Downgrading cdrdao from 1.2.5 to 1.2.4 fixed the issue for me, so this may be a subtle variation on #591.

I will give this a shot and see what it results in for me, thanks for pointing me in the right direction for the time being. I suppose someone should probably get in contact with the cdrdao maintainers.

AdamWill commented 11 months ago

Yeah, I think @Thra11 is right here. I ran into this on Fedora 38 (just upgraded my only system with an optical disc drive from 37 to 38...) and applying https://github.com/cdrdao/cdrdao/pull/21 to cdrdao does seem to fix it. So I think we can call this effectively the same as 591, caused by cdrdao.

BBaoVanC commented 3 months ago

I'm encountering this issue even with Arch's patched 1.2.5-3 (and 1.2.5-2), but I didn't before. Not sure what has changed, the 1.2.5-3 rebuild from a couple days ago didn't change any of the actual contents of the package and was just regenerating a missing metadata file.

Even with discs that worked before, I have the issue. Any ideas?

My log ``` INFO:whipper.command.cd:using configured read offset 6 INFO:whipper.command.cd:checking device /dev/sr0 Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/whipper/extern/task/task.py", line 523, in c callable_task(*args, **kwargs) File "/usr/lib/python3.12/site-packages/whipper/program/cdrdao.py", line 115, in _read self._done() File "/usr/lib/python3.12/site-packages/whipper/program/cdrdao.py", line 153, in _done self.toc.parse() File "/usr/lib/python3.12/site-packages/whipper/image/toc.py", line 202, in parse with open(self._path) as f: ^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmphuf8xnfj.cdrdao.read-toc.whipper.task' CRITICAL:whipper.command.main:exception FileNotFoundError at /usr/lib/python3.12/site-packages/whipper/image/toc.py:202: parse(): [Errno 2] No such file or directory: '/tmp/tmphuf8xnfj.cdrdao.read-toc.whipper.task' Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/whipper/extern/task/task.py", line 523, in c callable_task(*args, **kwargs) File "/usr/lib/python3.12/site-packages/whipper/program/cdrdao.py", line 115, in _read self._done() File "/usr/lib/python3.12/site-packages/whipper/program/cdrdao.py", line 153, in _done self.toc.parse() File "/usr/lib/python3.12/site-packages/whipper/image/toc.py", line 202, in parse with open(self._path) as f: ^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmphuf8xnfj.cdrdao.read-toc.whipper.task' ```
BBaoVanC commented 3 months ago

Nevermind, it turns out my drive numbering inexplicably changed. For some reason I get the FileNotFoundError mentioned instead of a message saying there's no CD in the drive. The drive giving me this issue is a TSSTcorp CDDVDW SH-222BB, although the drive seems to be dying because it won't read DVDs anymore and makes metallic noises with CDs (in other words, this may not be a software fault).