(noob alert) why doesn't this work?
bouke at gentoolinux.demon.nl
Tue Mar 22 14:27:08 CET 2005
Thanks for all suggestions. Your first point I knew, but was too lazy to type
it. It made no difference for the test files had all tags. Knowing that it
was not a asynchrous thing helped me a lot though. There had to be something
wrong with the command line for metaflac.
It turned out that some flac files have tags like Artist=artistname and others
have artist=artistname. Therefore it couldn't find the artist! So now I just
look for 'rtist=' which works great.
Thanks for all the help!
Op dinsdag 22 maart 2005 12:18, schreef Simon Brunning:
> On Tue, 22 Mar 2005 12:10:50 +0100, Bouke Woudstra
> <bouke at gentoolinux.demon.nl> wrote:
> > Hi,
> > I'm a bit stuck with this python script. It's aim is to encode all flac
> > files to wav and then to mp3. The only problem I have is to preserve the
> > tags. The code works when there's just one flac file in a directory but
> > fails for more. I can't see why the for loop fails here (flactags).
> > The error thrown is: UnboundLocalError: local variable 'title' referenced
> > before assignment
> Perhaps you get to line 56 without having gone through line 51? Might
> one of your flac files not have a title line?
> > I don't understand why this isn't assigned. I suspect that self.wav2mp3
> > doesn't wait for the first part to finish, but how to force it to wait?
> Nope. Looks asynchronous to me.
> Simon B,
> simon at brunningonline.net,
More information about the Python-list