thomasvs / morituri

For those about to RIP - a Unix CD ripper preferring accuracy over speed
GNU General Public License v3.0
301 stars 42 forks source link

"rip offset find" fails to initialise program.Program #33

Closed adamreeve closed 11 years ago

adamreeve commented 11 years ago

Tested at v0.2.1 and master at 821dfcf6e22a831453235ad7343206e01ff2814c, built from git.

Traceback (most recent call last):
  File "/home/adam/usr/bin/rip", line 39, in <module>
    sys.exit(main.main(sys.argv[1:]))
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/rip/main.py", line 45, in main
    ret = c.parse(argv)
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/rip/main.py", line 123, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 363, in parse
    ret = self.do(args)
  File "/home/adam/usr/lib/python2.7/site-packages/morituri/rip/offset.py", line 90, in do
    prog = program.Program()
TypeError: __init__() takes at least 2 arguments (1 given)
adamreeve commented 11 years ago

Looks like all that's needed is:

--- a/morituri/rip/offset.py
+++ b/morituri/rip/offset.py
@@ -87,7 +87,7 @@ CD in the AccurateRip database."""
         # this can be a symlink to another device

     def do(self, args):
-        prog = program.Program()
+        prog = program.Program(self.getRootCommand().config)
         runner = task.SyncRunner()
adamreeve commented 11 years ago

I'm not sure this is working correctly, or maybe it's just my drive. I've tried about 6 CDs and each one gives me:

No matching offset found.
Consider trying again with a different disc.

Should I report this as a separate bug with the debug log or is it just an issue with my drive, does it really matter?

thomasvs commented 11 years ago

On Tue, 2013-07-23 at 00:24 -0700, Adam Reeve wrote:

I'm not sure this is working correctly, or maybe it's just my drive. I've tried about 6 CDs and each one gives me:

No matching offset found. Consider trying again with a different disc.

Should I report this as a separate bug with the debug log or is it just an issue with my drive, does it really matter?

Which discs did you use? If they are obscure, there may not be accuraterip results for it and hence it can't figure out the right offset. Pick as popular a CD as you have.

T

— Reply to this email directly or view it on GitHub.

I'm just like you I never hear the bad news

Flumotion - the only way to stream! http://www.flumotion.net/

adamreeve commented 11 years ago

Ahh, my silly mistake, I didn't actually have cdparanoia installed. Running with DEBUG=5 showed these lines:

set exception, MissingDependencyException('cdparanoia',), 'exception MissingDependencyException at...

But this line in morituri/rip/offset.py didn't seem to have any effect:

self.warning("Unknown exception for offset %d: %r" % (
                offset, e))

I never saw this message anywhere, even with DEBUG=5.

ghost commented 11 years ago

Hi, I am having a similar trouble on Fedora 19, with Morituri installed from http://thomas.apestaart.org/download/morituri/morituri-0.2.1-1.fc18.noarch.rpm

When I do the command rip offset find on a Plextor PX-130A with the first disc of "The Smashing Pumpkins - Mellon Collie and the Infinite Sadness" , I obtain:

Traceback (most recent call last): File "/usr/bin/rip", line 39, in sys.exit(main.main(sys.argv[1:])) File "/usr/lib/python2.7/site-packages/morituri/rip/main.py", line 45, in main ret = c.parse(argv) File "/usr/lib/python2.7/site-packages/morituri/rip/main.py", line 123, in parse logcommand.LogCommand.parse(self, argv) File "/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse return self.subCommands[command].parse(args[1:]) File "/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 401, in parse return self.subCommands[command].parse(args[1:]) File "/usr/lib/python2.7/site-packages/morituri/extern/command/command.py", line 363, in parse ret = self.do(args) File "/usr/lib/python2.7/site-packages/morituri/rip/offset.py", line 90, in do prog = program.Program() TypeError: init() takes at least 2 arguments (1 given)

thomasvs commented 11 years ago

I also fixed not handling missing cdparanoia properly.

adamreeve commented 11 years ago

Thanks, tested without cdparanoia and it tells me exactly what's wrong :)

Although I had to fix a syntax error in morituri/configure/installed.py (should be a ":"):

    'revision', 'v0.2.1-12-g6aff829',
              ^
SyntaxError: invalid syntax
thomasvs commented 11 years ago

Thanks, fixed in git too.

T

On Tue, 2013-07-30 at 02:49 -0700, Adam Reeve wrote:

Thanks, tested without cdparanoia and it tells me exactly what's wrong :)

Although I had to fix a syntax error in morituri/configure/installed.py (should be a ":"):

'revision', 'v0.2.1-12-g6aff829',
          ^

SyntaxError: invalid syntax

— Reply to this email directly or view it on GitHub.

Well baby let me shake it If I can move it with you will you let me take it

GStreamer - bringing multimedia to your desktop http://gstreamer.freedesktop.org/