Closed mcclurec closed 11 years ago
That's weird. What filesystem are these files on?
If it's a default'ish one like Ext4, it work fine with any character except a null byte and a slash. If you are on Linux, tvnamer assumes it's your filesystem is like this (and only removes \0
and /
)
If you are using something like a FAT32 NAS drive, that would explain this error.
If it is FAT32/NTFS, you can use the windows_safe_filenames
config option. Alternatively you can use custom_filename_character_blacklist
to remove specific characters, or the replacements to do more specific cleanup
That's weird. What OS and filesystem are you using? I assume it's Linux based on the path
If so, Ext4 and similar filesystems typically accept any character except a null-byte and /
- both are removed.
If you are using a filesystem like FAT32 (common for volumes mounted from NAS devices), that would explain this error. tvnamer sanitises for Ext4'ish FS, and has no idea you are writing to a device with more limited filenames
A few options, if this is the problem:
"windows_safe_filenames": true
config option to force roughly-FAT32-compatible filenames"custom_filename_character_blacklist": "abc/?"
to be more specific about the charactersAhh, this particular drive is a FAT 32. I have a mixed disk environment on Ubuntu 12.04. I’ll probably just use the "windows_safe_filenames": true option. I wasn’t thinking that I’d need that on a linux system, but I forgot about the joys of still having a FAT 32 drive laying around. It might be time to back that up and reformat it. Thanks for the speedy reply.
Colin
From: dbr [mailto:notifications@github.com] Sent: Tuesday, December 11, 2012 3:37 AM To: dbr/tvnamer Cc: mcclurec Subject: Re: [tvnamer] Episodes with puctuation marks cause OSError(22, 'Invalid argument') (#61)
That's weird. What OS and filesystem are you using? I assume it's Linux based on the path
If so, Ext4 and similar filesystems typically accept any character except a null-byte and / - both are removed.
If you are using a filesystem like FAT32 (common for volumes mounted from NAS devices), that would explain this error. tvnamer sanitises for Ext4'ish FS, and has no idea you are writing to a device with more limited filenames
A few options, if this is the problem:
— Reply to this email directly or view it on GitHub https://github.com/dbr/tvnamer/issues/61#issuecomment-11240346 .
I was cleaning up some episodes from It's Always Sunny in Philadelphia, and a handful wouldn't rename. What I look on TVDB, all the episode names have punctuation like colons or question marks. I believe TVNamer is trying to pass these through unescaped, and it's causing the failure. Here's a sample below.
Episodes 5,7,9 & 10 of season six all have punctuation and all are failing the same way. Here's a link to the episode guide. http://thetvdb.com/?tab=season&seriesid=75805&seasonid=268951&lid=7
On a side note: Thanks for this fantastic script. It's exactly what I needed.