python-audio-tools icon indicating copy to clipboard operation
python-audio-tools copied to clipboard

track2track issue when title tag contains '?'

Open ghost opened this issue 12 years ago • 2 comments

I just bought the Drive soundtrack, used iTunes to rip it to Apple Lossless m4a files for my iPad/iPhone, and then attempted to use python-audio-tools to generate .flac versions for my audio center.

However, track 11 had a question mark in the track title which doesn't seem to get escaped before it is passed to the flac encoder:

$ track2track -t flac -d flac .m4a 01 - Kavinsky & Lovefoxxx - Nightcall.m4a -> flac/Kavinsky & Lovefoxxx - 01 - Nightcall.flac 02 - Desire - Under Your Spell.m4a -> flac/Desire - 02 - Under Your Spell.flac 03 - College - A Real Hero (feat. Electric Youth).m4a -> flac/College - 03 - A Real Hero (feat. Electric Youth).flac 04 - Riz Ortolani - Oh My Love (feat. Katyna Ranieri).m4a -> flac/Riz Ortolani - 04 - Oh My Love (feat. Katyna Ranieri).flac 05 - The Chromatics - Tick of the Clock.m4a -> flac/The Chromatics - 05 - Tick of the Clock.flac 06 - Cliff Martinez - Rubber Head.m4a -> flac/Cliff Martinez - 06 - Rubber Head.flac 07 - Cliff Martinez - I Drive.m4a -> flac/Cliff Martinez - 07 - I Drive.flac 08 - Cliff Martinez - He Had a Good Time.m4a -> flac/Cliff Martinez - 08 - He Had a Good Time.flac 09 - Cliff Martinez - They Broke His Pelvis.m4a -> flac/Cliff Martinez - 09 - They Broke His Pelvis.flac 10 - Cliff Martinez - Kick Your Teeth.m4a -> flac/Cliff Martinez - 10 - Kick Your Teeth.flac ** Error: [Errno 22] Invalid argument: "flac/Cliff Martinez - 11 - Where's the Deluxe Version?.flac

ghost avatar Mar 23 '12 15:03 ghost

Are you trying to write your files to a vfat filesystem? That might explain why Python Audio Tools is unable to generate a file containing a question mark. Try the command:

$ touch "testing?"

in your output directory. If that also has an error, it might help isolate the problem.

In the meantime, I'll see if I can find a portable way of detecting invalid filename characters to prevent these sort of surprises in the future.

tuffy avatar Mar 23 '12 16:03 tuffy

Ah yes, I was being stupid and happened to be running on a vfat USB stick at the time, so it was actually just an issue in attempting to create the filename rather than an issue passing the cmdline args to flac encoder.

ghost avatar Mar 24 '12 15:03 ghost