einstein95 / crunchy-xml-decoder

GNU General Public License v2.0
35 stars 14 forks source link

[ONGOING] File downloads but trying to download subtitles errors out the script #107

Open jaw20 opened 7 years ago

jaw20 commented 7 years ago

I can download the video for these 2 episodes normally, but any time I try to or the script automatically downloads the subtitles for the episode the script errors out with IOError: [Errno 2] No such file or directory: u'export\\Re-ZERO -Starting Life in Another World- - The End of the Beginning and the Beginning of the End (Part 1) - The End of the Beginning and the Beginning of the End (Part 1)[eng][English (US)].ass

This effects both hls and rtmp.

Complete traceback:

Traceback (most recent call last): File "C:\Users\Jon\Downloads\crunchy-xml-decoder-master\crunchy-xml-decoder-master\crunchy-xml-decoder.py", line 369, in makechoise() File "C:\Users\Jon\Downloads\crunchy-xml-decoder-master\crunchy-xml-decoder-master\crunchy-xml-decoder.py", line 317, in makechoise queueu('.\queue.txt') File "C:\Users\Jon\Downloads\crunchy-xml-decoder-master\crunchy-xml-decoder-master\crunchy-xml-decoder.py", line 106, in queueu ultimate.ultimate(line.rstrip('\n'), '', '') File "crunchy-xml-decoder\ultimate.py", line 286, in ultimate subtitles(title) File "crunchy-xml-decoder\ultimate.py", line 162, in subtitles subfile = open(os.path.join('export', title+'['+sub_id3.pop(0)+']'+sub_id4.pop(0)+'.###'), 'wb') IOError: [Errno 2] No such file or directory: u'export\Re-ZERO -Starting Life in Another World- - The End of the Beginning and the Beginning of the End (Part 1) - The End of the Beginning and the Beginning of the End (Part 1)[eng][English (US)].###'

It seems weird because it should be able to download the subtitles if it downloaded the episode.

jsonn commented 7 years ago

I wonder if you run into the 260 character path limit.

jaw20 commented 7 years ago

Then how would i get it to download?

jsonn commented 7 years ago

Easiest would be to just move the main crunchy-xml-decoder-master directory e.g. to C:\C or so. That should be short enough to work even for this excessively long title.

jsonn commented 7 years ago

Was that the problem? I think we can workaround this, but I wanted to make sure the path length is the problem.

jaw20 commented 7 years ago

Yea it was the problem.

jsonn commented 7 years ago

Hm. Looking a bit further into this, I don't see a good way for handling it. While it wouldn't be too difficult to expand the relative path names to unicode absolute paths with the \?\ prefix, it doesn't look like mkvtoolnix can handle them. As such, it wouldn't really solve anything but just push the problem a bit around.

jaw20 commented 7 years ago

I mean you could use mklink /J in the bat file to shorten the original path to something shorter. Plus because windows does it, its treated as a new directory. Additionally, mkvmerge could just grab the path because it links the folder to a new name.

jaw20 commented 7 years ago

Alternatively, I could log an issue on the mkvtoolnix github about \ ?\ , do you think that would be easier than a workaround? @jsonn

jsonn commented 7 years ago

It's double backslash question backslash, sorry. I'm not sure if we should setup a fake directory automatically. That might be a doable approach or optionally limiting the title name etc. The latter would annoy me on non-insane systems if it is done by default :)

jaw20 commented 7 years ago

@jsonn Apparently, mkvmerge supports unc paths. We could try and do that instead of directory junctions.

limitless-dev commented 7 years ago

I'm getting the same problem here while downloading. I moved the directory to C:\ as @jsonn suggested above, but it didn't fix it. URL: here longc