Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jaw20 opened this issue Nov 30, 2016 · 11 comments

Comments

@jaw20
Copy link
Contributor

jaw20 commented Nov 30, 2016

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
Copy link
Contributor

jsonn commented Nov 30, 2016

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

@jaw20
Copy link
Contributor Author

jaw20 commented Dec 1, 2016

Then how would i get it to download?

@jsonn
Copy link
Contributor

jsonn commented Dec 1, 2016

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.

@jaw20 jaw20 closed this as completed Dec 1, 2016
@jaw20 jaw20 changed the title [ONGOING] File downloads but trying to download subtitles errors out the script [SOLVED] File downloads but trying to download subtitles errors out the script Dec 1, 2016
@jsonn
Copy link
Contributor

jsonn commented Dec 1, 2016

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

@jaw20
Copy link
Contributor Author

jaw20 commented Dec 1, 2016

Yea it was the problem.

@jaw20 jaw20 reopened this Dec 1, 2016
@jaw20 jaw20 changed the title [SOLVED] File downloads but trying to download subtitles errors out the script [UNRESOLVED] File downloads but trying to download subtitles errors out the script Dec 1, 2016
@jaw20 jaw20 changed the title [UNRESOLVED] File downloads but trying to download subtitles errors out the script [ONGOING] File downloads but trying to download subtitles errors out the script Dec 1, 2016
@jsonn
Copy link
Contributor

jsonn commented Dec 1, 2016

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
Copy link
Contributor Author

jaw20 commented Dec 1, 2016

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
Copy link
Contributor Author

jaw20 commented Dec 1, 2016

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

@jsonn
Copy link
Contributor

jsonn commented Dec 1, 2016

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
Copy link
Contributor Author

jaw20 commented Dec 2, 2016

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

@limitless-dev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants