Ticket #89 (closed defect: fixed)

Opened 15 months ago

Last modified 4 months ago

Fails to rip track with \ in its name

Reported by: https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu Owned by: https://thomasvs.myopenid.com/
Priority: major Milestone: 0.2.0
Component: morituri Version: master
Keywords: Cc: sjordet@…

Description

Melody A.M. by Röyksopp has a track named 40 Years Back\Come, morituri chokes on it during CRC check:

Verifying track 10 of 10: 10. Röyksopp - 40 Years Back\Come.flac
Calculating CRC 0 %
Calculating CRC 0 %

Traceback (most recent call last):

File "/usr/local/bin/rip", line 35, in <module>

sys.exit(main.main(sys.argv[1:]))

File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 16, in main

ret = c.parse(argv)

File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 89, in parse

logcommand.LogCommand?.parse(self, argv)

File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 335, in parse

return self.subCommands[command].parse(args[1:])

File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 335, in parse

return self.subCommands[command].parse(args[1:])

File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 304, in parse

ret = self.do(args)

File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 277, in do

ripIfNotRipped(i + 1)

File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 219, in ripIfNotRipped

if not prog.verifyTrack(runner, trackResult):

File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 413, in verifyTrack

runner.run(t)

File "/usr/local/lib/python2.7/site-packages/morituri/extern/task/task.py", line 500, in run

raise TaskException?(task.exception, message=msg)

morituri.extern.task.task.TaskException?: (<GstException: GError 'Ressource introuvable.', debug 'gstfilesrc.c(1036): gst_file_src_start (): /GstPipeline:pipeline9/GstFileSrc:filesrc9:\nNo such file "/home/teuf/Musique/R\xc3\xb6yksopp - Melody A.M./10. R\xc3\xb6yksopp - 40 Years BackCome.flac"'>, 'exception GstException? at /usr/local/lib/python2.7/site-packages/morituri/extern/task/gstreamer.py:104: start(): (<GError at 0x2ba5e00>, \'gstfilesrc.c(1036): gst_file_src_start (): /GstPipeline:pipeline9/GstFileSrc:filesrc9:\\nNo such file "/home/teuf/Musique/R
xc3
xb6yksopp - Melody A.M./10. R
xc3
xb6yksopp - 40 Years BackCome?.flac"\')\nTraceback (most recent call last):\n File "/usr/local/lib/python2.7/site-packages/morituri/extern/task/task.py", line 507, in _startWrap\n task.start(self)\n File "/usr/local/lib/python2.7/site-packages/morituri/extern/task/gstreamer.py", line 104, in start\n raise self.exception\nGstException: (<GError at 0x2ba5e00>, \'gstfilesrc.c(1036): gst_file_src_start (): /GstPipeline:pipeline9/GstFileSrc:filesrc9:\\nNo such file "/home/teuf/Musique/R
xc3
xb6yksopp - Melody A.M./10. R
xc3
xb6yksopp - 40 Years BackCome?.flac"\')\n')

Change History

comment:1 Changed 15 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

  • Summary changed from Fails to rip track with / in its name to Fails to rip track with \ in its name

In the description, I

comment:2 Changed 15 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

Sorry nonsensical comment, all I wanted to do was to fix the description :)

comment:3 Changed 14 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

I've made a bit of progress on this, the filename passed to GStreamer in ChecksumTask? needs to have the '\' escaped (which gives

when you add the python escaping).

diff --git a/morituri/extern/task/gstreamer.py b/morituri/extern/task/gstreamer.py
index 1fa7491..af0ae1b 100644
--- a/morituri/extern/task/gstreamer.py
+++ b/morituri/extern/task/gstreamer.py
@@ -29,7 +29,7 @@ def quoteParse(path):
     # Make sure double quotes are escaped.  See
     # morituri.test.test_common_checksum
 
-    return path.replace('"', '\\"')
+    return path.replace('"', '\\"').replace('\\', '\\\\')
 
 class GstException(Exception): 

allows me to go further in the rip, but then (I think it comes after but I might be wrong) it fails with:

DEBUG [ 9523]                                  ImageVerifyTask   avril 01 22:49:53      verifying track 9 (morituri/image/image.py:208)
DEBUG [ 9523]                                  ImageVerifyTask   avril 01 22:49:53      schedule scan of audio length of u"/home/teuf/Musique/R\xf6yksopp - Melody A.M./09. R\xf6yksopp - She's So.flac" (morituri/image/image.py:215)
DEBUG [ 9523]                                  ImageVerifyTask   avril 01 22:49:53      verifying track 10 (morituri/image/image.py:208)
                                              
AccurateRip URL http://www.accuraterip.com/accuraterip/0/3/3/dBAR-010-0010d330-008865bd-770ae60a.bin
13 AccurateRip reponses found
Traceback (most recent call last):
  File "/usr/local/bin/rip", line 35, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 16, in main
    ret = c.parse(argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 89, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 343, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 343, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 312, in parse
    ret = self.do(args)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 338, in do
    prog.verifyImage(runner, responses)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 495, in verifyImage
    verifytask = image.ImageVerifyTask(cueImage)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 213, in __init__
    path = image.getRealPath(index.path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 64, in getRealPath
    return self.cue.getRealPath(path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/cue.py", line 214, in getRealPath
    raise KeyError, "Cannot find file for %r" % path
KeyError: "Cannot find file for u'10. R\\xf6yksopp - 40 Years Back\\\\Come.flac'"

so I'd say there is some place where the filename would need to be unescaped.

comment:4 Changed 10 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

This is a duplicate of ticket #71 I think.

comment:5 Changed 9 months ago by thomas

  • Status changed from new to closed
  • Resolution set to fixed

In [593]:

  • morituri/extern/task/gstreamer.py:
  • morituri/test/test_common_checksum.py: Protect backslashes in names. Fixes #89.

comment:6 Changed 9 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

  • Status changed from closed to reopened
  • Resolution fixed deleted

This unfortunately does not seem to fix it, I still get this with latest svn:

  Traceback (most recent call last):
    File "/usr/local/bin/rip", line 35, in <module>
      sys.exit(main.main(sys.argv[1:]))
    File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 16, in main
      ret = c.parse(argv)
    File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 91, in parse
      logcommand.LogCommand.parse(self, argv)
    File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 349, in parse
      return self.subCommands[command].parse(args[1:])
    File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 349, in parse
      return self.subCommands[command].parse(args[1:])
    File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 318, in parse
      ret = self.do(args)
    File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 338, in do
      prog.verifyImage(runner, responses)
    File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 496, in verifyImage
      verifytask = image.ImageVerifyTask(cueImage)
    File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 213, in __init__
      path = image.getRealPath(index.path)
    File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 64, in getRealPath
      return self.cue.getRealPath(path)
    File "/usr/local/lib/python2.7/site-packages/morituri/image/cue.py", line 214, in getRealPath
      raise KeyError, "Cannot find file for %r" % path
  KeyError: "Cannot find file for u'10. R\\xf6yksopp - 40 Years Back\\\\Come.flac'"

comment:7 Changed 6 months ago by thomas

  • Status changed from reopened to closed
  • Resolution set to fixed

In [641]:

  • morituri/extern/task/gstreamer.py: Fix wrong commit made to fix #89.

comment:8 follow-up: ↓ 10 Changed 6 months ago by https://thomasvs.myopenid.com/

  • Status changed from closed to reopened
  • Resolution fixed deleted

But that commit wasn't a fix, reopening.

comment:9 Changed 6 months ago by https://thomasvs.myopenid.com/

  • Milestone changed from 0.1.3 to future

comment:10 in reply to: ↑ 8 Changed 6 months ago by https://www.google.com/accounts/o8/id?id=aitoawnfkt2szxtw0hkw4_yj-d9lrmlf69i_szu

Replying to https://thomasvs.myopenid.com/:

But that commit wasn't a fix, reopening.

This may not be a fix, but at least it improved things, now I can past ripping track 10 to the accurate rip verification:

Verifying track 1 of 10: 01. Röyksopp - So Easy.flac
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Verifying track 2 of 10: 02. Röyksopp - Eple.flac
Verifying track 3 of 10: 03. Röyksopp - Sparks.flac
Verifying track 4 of 10: 04. Röyksopp - In Space.flac
Verifying track 5 of 10: 05. Röyksopp - Poor Leno.flac
Verifying track 6 of 10: 06. Röyksopp - A Higher Place.flac
Verifying track 7 of 10: 07. Röyksopp - Röyksopp's Night Out.flac
Verifying track 8 of 10: 08. Röyksopp - Remind Me.flac
Verifying track 9 of 10: 09. Röyksopp - She's So.flac
Verifying track 10 of 10: 10. Röyksopp - 40 Years Back\Come.flac
AccurateRip URL http://www.accuraterip.com/accuraterip/0/3/3/dBAR-010-0010d330-008865bd-770ae60a.bin
13 AccurateRip reponses found
Traceback (most recent call last):
  File "/usr/local/bin/rip", line 35, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 17, in main
    ret = c.parse(argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/main.py", line 93, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 383, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 383, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/local/lib/python2.7/site-packages/morituri/extern/command/command.py", line 347, in parse
    ret = self.do(args)
  File "/usr/local/lib/python2.7/site-packages/morituri/rip/cd.py", line 384, in do
    prog.verifyImage(runner, responses)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/program.py", line 499, in verifyImage
    verifytask = image.ImageVerifyTask(cueImage)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 216, in __init__
    path = image.getRealPath(index.path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/image.py", line 65, in getRealPath
    return self.cue.getRealPath(path)
  File "/usr/local/lib/python2.7/site-packages/morituri/image/cue.py", line 186, in getRealPath
    return common.getRealPath(self._path, path)
  File "/usr/local/lib/python2.7/site-packages/morituri/common/common.py", line 340, in getRealPath
    raise KeyError("Cannot find file for %r" % filePath)
KeyError: "Cannot find file for u'10. R\\xf6yksopp - 40 Years Back\\\\Come.flac'"

I don't know if this is caused by this change, or by other changes.

comment:11 Changed 4 months ago by https://www.google.com/accounts/o8/id?id=aitoawl7nkd5qf_52ofoqc5dwqfblmfrub2kof0

  • Cc sjordet@… added

I have the same cd, and same problem (obviously). The ripping goes perfectly well, but it can't find the file when trying to calculate AccurateRip?. But filename and metadata for the file is correct - it's the AccurateRip? that's the problem.

comment:12 Changed 4 months ago by http://thomasvs.myopenid.com/

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Milestone changed from future to 0.2.0

Fixed now; see #107.

Note: See TracTickets for help on using tickets.