Benni-chan / nzbToAniDB

postprocessing script for animes (to use with sabnzbd+ or nzbget or even as stand alone) to rename files after a sync with anidb.net. files can additionally be renamed via tvdb
24 stars 7 forks source link

Script says nothing is there #6

Closed saitoh183 closed 12 years ago

saitoh183 commented 12 years ago

Traceback (most recent call last): File "C:\Media\Scripts\anidb.py", line 307, in shutil.rmtree(folder) File "C:\Python27\lib\shutil.py", line 249, in rmtree onerror(os.remove, fullname, sys.exc_info()) File "C:\Python27\lib\shutil.py", line 247, in rmtree os.remove(fullname) WindowsError: [Error 2] The system cannot find the file specified: 'I:\ServerFo lders\Download_anime\New folder\Bleach - 9x03 - 170 - Desperate Struggle Unde r the Moonlit Night, the Mysterious Assassin and Zanpakuto.avi'

C:\Media\Scripts>sabtoanidb.py I:\ServerFolders\Download_anime Nothing to do.

But the file is in the directory. This was the last file in a batch of files. It also happened to me with 2 other files and i was force to rename them manually.

saitoh183 commented 12 years ago

The seems to be the character length(shorten the name and it worked).. File was

Bleach - 9x03 - 170 - Desperate Struggle Under the Moonlit Night, the Mysterious Assassin and Zanpakutō.mkv

or could it be the special o at the end of the file name?

_Edit_ is the" ō " character that causes the issue Also " ・"

Benni-chan commented 12 years ago

yes, special chars in the filename can cause to fail...

i'll have to include some failsafe, to ignore special chars

Benni-chan commented 12 years ago

i just saw, that this error was when it tried to delete the folder... i pushed an update, which ignores this error (it should just leave the folder in that case) also it handles filenames with special chars a lot better when renaming files. (not perfect yet)