whipper-team / whipper

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

Crashes with one particular CD #145

Open kylegordon opened 7 years ago

kylegordon commented 7 years ago

When trying to rip one CD in particular, whipper (and morituri) crash out with the following error.

The affected CD is https://musicbrainz.org/release/d507a28c-1791-4d9d-8be0-2f41901db41c Running on Ubuntu 16.04.2 LTS and Whipper master.

root@oxcart:~# whipper cd rip -o 6 -O /media/store/music_ripped/
Checking device /dev/sr0
Traceback (most recent call last):
  File "/usr/local/bin/whipper", line 9, in <module>
    load_entry_point('whipper==0.4.2', 'console_scripts', 'whipper')()
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/command/main.py", line 31, in main
    ret = cmd.do()
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/command/basecommand.py", line 123, in do
    return self.cmd.do()
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/command/basecommand.py", line 123, in do
    return self.cmd.do()
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/command/cd.py", line 117, in do
    self.device)
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/common/program.py", line 112, in getFastToc
    t = cdrdao.ReadTOCTask(device)
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/program/cdrdao.py", line 70, in ReadTOCTask
    return read_toc(device, fast_toc=True)
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/program/cdrdao.py", line 44, in read_toc
    toc.parse()
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/image/toc.py", line 235, in parse
    self._index(currentTrack, 1, absoluteOffset, pregapLength)
  File "/usr/local/lib/python2.7/dist-packages/whipper-0.4.2-py2.7.egg/morituri/image/toc.py", line 162, in _index
    currentTrack.index(i, path=s.path,
AttributeError: 'NoneType' object has no attribute 'path'
JoeLametta commented 7 years ago

Thanks for the bug report.

In order to have a better idea regarding what's happening here, I'd like you to provide a report logfile too (as explained in the README). Then also run the following command against the same CD and post the content of the resulting cdrdao_fast.toc file.

# Whipper's ReadTOCTask uses --fast-toc
read-toc --fast-toc --device /dev/sr0 cdrdao_fast.toc
kylegordon commented 7 years ago

Hi, certainly... cdrdao_fast.toc.gz whipper.log.gz

JoeLametta commented 7 years ago
// Track 1
TRACK AUDIO
NO COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
ISRC "GBAHT0300030"
SILENCE 3728:16:15
FILE "data.wav" 0 00:00:00

There's probably a bug in cdrdao as it reports a completely crazy silence length for the first track of the CD: SILENCE 3728:16:15 (length is expressed in MM:SS:FF). Still haven't checked if there's one in whipper too (or is something which is so wrong it's not supposed to be handled).

JoeLametta commented 5 years ago

@janifr

Hi, I just installed debian testing and whipper 0.7.3 from deb-multimedia. I'm getting the following error:

jani@ripperi:~$ whipper cd rip
INFO:whipper.command.cd:using configured read offset 6
INFO:whipper.command.cd:checking device /dev/sr0
INFO:whipper.command.cd:reading TOC...
CDDB disc id: e0100f0f
MusicBrainz disc id 1sOmm3YBExqtJigMpphyt1v.Xj0-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+15+308490+183+19160+34320+51448+69190+90953+110213+139555+168450+186075+203230+219173+235405+252570+277288&tracks=15&id=1sOmm3YBExqtJigMpphyt1v.Xj0-
Disc duration: 01:08:30.760, 15 audio tracks
INFO:musicbrainzngs:in <ws2:release-group>, uncaught attribute type-id
INFO:musicbrainzngs:in <ws2:release-group>, uncaught attribute type-id

Matching releases:

Artist  : Scorpions
Title   : Best of Rockers ’n’ Ballads
Duration: 01:08:58.291
URL     : https://musicbrainz.org/release/235241ed-f7dc-47a4-b2c6-02ef57c2d587
Release : 235241ed-f7dc-47a4-b2c6-02ef57c2d587
Type    : Compilation
Barcode : 724353469320
Cat no  : 7243 5 34693 2 0

Artist  : Scorpions
Title   : Best of Rockers ’n’ Ballads
Duration: 01:08:44.291
URL     : https://musicbrainz.org/release/b0008a33-6a71-4a31-80f9-ceaa4afd1366
Release : b0008a33-6a71-4a31-80f9-ceaa4afd1366
Type    : Compilation
Barcode : 077779343928
Cat no  : CDP 566Y 793439 2

Traceback (most recent call last):
  File "/usr/bin/whipper", line 11, in <module>
    load_entry_point('whipper==0.7.3', 'console_scripts', 'whipper')()
  File "/usr/lib/python2.7/dist-packages/whipper/command/main.py", line 43, in main
    ret = cmd.do()
  File "/usr/lib/python2.7/dist-packages/whipper/command/basecommand.py", line 139, in do
    return self.cmd.do()
  File "/usr/lib/python2.7/dist-packages/whipper/command/basecommand.py", line 139, in do
    return self.cmd.do()
  File "/usr/lib/python2.7/dist-packages/whipper/command/cd.py", line 150, in do
    out_fpath)
  File "/usr/lib/python2.7/dist-packages/whipper/common/program.py", line 125, in getTable
    t = cdrdao.ReadTableTask(device, out_path)
  File "/usr/lib/python2.7/dist-packages/whipper/program/cdrdao.py", line 102, in ReadTableTask
    return read_toc(device, toc_path=toc_path)
  File "/usr/lib/python2.7/dist-packages/whipper/program/cdrdao.py", line 46, in read_toc
    toc.parse()
  File "/usr/lib/python2.7/dist-packages/whipper/image/toc.py", line 233, in parse
    self._index(currentTrack, 1, absoluteOffset, pregapLength)
  File "/usr/lib/python2.7/dist-packages/whipper/image/toc.py", line 160, in _index
    currentTrack.index(i, path=s.path,
AttributeError: 'NoneType' object has no attribute 'path'

Whipper.conf:

[main]
path_filter_fat = True          ; replace FAT file system unsafe characters in filenames with _
path_filter_special = False     ; replace special characters in filenames with _

[drive:PLDS%20%20%20%20%3ADVD-RW%20DH16ABSH%20%3AYL32]
vendor = PLDS
model = DVD-RW DH16ABSH
release = YL32
defeats_cache = True
read_offset = 6

[whipper.cd.rip]
output_directory = ~/
working_directory = ~/
track_template = %%A/%%d/%%t - %%a - %%n
disc_template = %%A/%%d/%%A - %%d

What might be wrong?

Thanks for the bug report.

In order to have a better idea regarding what's happening here, I'd like you to provide a report logfile too (as explained in the README). Then also run the following command against the same CD and post the content of the resulting cdrdao_fast.toc file.

# Whipper's ReadTOCTask uses --fast-toc
read-toc --fast-toc --device /dev/sr0 cdrdao_fast.toc
mitcoding commented 3 years ago

I'm getting the same issue except it's complaining about isCDr attribute

CDDB disc id: 7b0ec909 MusicBrainz disc id 1jUt4q_iYlO0HSIEQx.mYSxChcc- MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+9+284068+150+4563+51537+98713+103154+143173+192896+197215+236771&tracks=9&id=1jUt4q_iYlO0HSIEQx.mYSxChcc- Disc duration: 01:03:05.573, 9 audio tracks

Matching releases:

Artist : Adventures in Odyssey Title : Volume 34: In Your Wildest Dreams (Disc 1 of 4) Duration: 01:03:05.570 URL : https://musicbrainz.org/release/e4566c92-b79f-4b9c-bdee-a618e649d036 Release : e4566c92-b79f-4b9c-bdee-a618e649d036 Type : Album Barcode : 9781561798872 Country : United States

Traceback (most recent call last): File "/usr/local/bin/whipper", line 11, in load_entry_point('whipper==0.9.1.dev84+g1661e42', 'console_scripts', 'whipper')() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/main.py", line 56, in main ret = cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/cd.py", line 129, in do self.program.result.isCdr = cdrdao.DetectCdr(self.device) AttributeError: 'NoneType' object has no attribute 'isCdr'

cdrdao_fast.toc.gz whipper.log.gz

mitcoding commented 3 years ago

this is also happening with U2 song of inocences

CDDB disc id: f30fe211 MusicBrainz disc id 8aN4SLkjmOD2LC4x7dObhxgnEn4- MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+17+305130+150+12240+31507+48412+66284+85914+101219+116197+131481+153638+171743+193188+211233+230714+247752+265406+285893&tracks=17&id=8aN4SLkjmOD2LC4x7dObhxgnEn4- Disc duration: 01:07:46.400, 17 audio tracks

Matching releases:

Artist : U2 Title : Songs of Experience (deluxe edition) Duration: 01:07:46.397 URL : https://musicbrainz.org/release/450318b9-63c8-48a8-9a0c-6567cd2472ae Release : 450318b9-63c8-48a8-9a0c-6567cd2472ae Type : Album Barcode : 602557977004 Country : United States Cat no : B0027760-02

Traceback (most recent call last): File "/usr/local/bin/whipper", line 11, in load_entry_point('whipper==0.9.1.dev84+g1661e42', 'console_scripts', 'whipper')() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/main.py", line 56, in main ret = cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/usr/local/lib/python3.8/dist-packages/whipper-0.9.1.dev84+g1661e42-py3.8-linux-x86_64.egg/whipper/command/cd.py", line 129, in do self.program.result.isCdr = cdrdao.DetectCdr(self.device) AttributeError: 'NoneType' object has no attribute 'isCdr'

whipper.log.gz cdrdao_fast.toc.gz

JoeLametta commented 3 years ago

@mitcoding Hi, the issue you've reported is caused by a regression introduced in commit 3acc3ffed67b83cc9e1f1b6ae42283840c92a488 and it has been fixed with commit b754b2b0bf30a72304d1103e64d17e94ec3b36a4.