Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Problems with id3lib-ruby
Bira
12/2/2006 11:41:00 AM
Hello,
I'm trying to organize my MP3 collection using id3lib-ruby, to go
through it and sort the files into artist/album folders according to
their ID3 information.
However, in some files, my script breaks with the following message:
undefined method 'get_type' for nil:NilClass
The message corresponds to the following line:
tag = ID3Lib::Tag.new(mp3)
'mp3' is a variable holding the name of the file being currently processed.
After a bit of testing and looking at the documentation for the "new"
method, it seems this happens because a given file may have some
invalid frames in its tag, or no frames at all (i.e, no tag).
Does anyone know if this is a bug or simply user error on my part? If
it is a bug, I'll gladly report it on rubyforge, but if it's user
error I'd like to know the correct way to go about this :).
--
Bira
http://compexplicita.bl...
http://sinfoniaferida.bl...
1 Answer
Robin Stocker
12/2/2006 12:48:00 PM
0
Bira schrieb:
> Hello,
>
> I'm trying to organize my MP3 collection using id3lib-ruby, to go
> through it and sort the files into artist/album folders according to
> their ID3 information.
>
> However, in some files, my script breaks with the following message:
>
> undefined method 'get_type' for nil:NilClass
>
> The message corresponds to the following line:
>
> tag = ID3Lib::Tag.new(mp3)
>
> 'mp3' is a variable holding the name of the file being currently processed.
>
> After a bit of testing and looking at the documentation for the "new"
> method, it seems this happens because a given file may have some
> invalid frames in its tag, or no frames at all (i.e, no tag).
>
> Does anyone know if this is a bug or simply user error on my part? If
> it is a bug, I'll gladly report it on rubyforge, but if it's user
> error I'd like to know the correct way to go about this :).
>
Hi,
It's a known bug, the tracker item is here:
http://rubyforge.org/tracker/index.php?func=detail&aid=6446&group_id=1384&...
The problem is fixed in SVN. It would be nice if you could try it out
and post your results to the tracker item above. Here's what you would
have to do:
svn checkout svn://rubyforge.org/var/svn/id3lib-ruby/branches/0/
id3lib-ruby
cd id3lib-ruby
rake ext
ruby -Ilib:ext -rid3lib -e 'ID3Lib::Tag.new(ARGV.first)' /path/to/mp3
Or you could wait for 0.4.2. Anyway, thanks for reporting :).
--
Robin
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Problems with id3lib-ruby
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password