Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
amaarten
Posts: 8
Joined: Fri Dec 11, 2015 6:43 am

410 [CRITICAL ERROR/ Subtitle file not found on hdd

Sat Dec 12, 2015 6:31 pm

Hey,

While refactoring my xml-rpc client, I routinely get the following error when trying to download a sub.
(Currently this only happens for a certain breaking bad episode)

I use the following api function
Using http://trac.opensubtitles.org/projects/ ... dSubtitles

IdSubtitle: 4290500
IDSubtitleFile: 1952100888
{'status': '410 [CRITICAL ERROR] <b>Subtitle file 1952100888.gz for 4290500 was not found on hdd</b>', 'seconds': 0.199, 'data': ''}
See http://dl.opensubtitles.org/en/download/sub/4290500

Because parsing a string to detect which subtitle is not available online is not future-proof,
I will have to download each subtitle separately with a xml-rpc request.

It would be nice if the api would allow to check for a soft fail-over.
The api could return only data for the subtitles found and set a error flag for all others.
e.g. return
{'status': '200', 'seconds': 0.199, 'data': [], 'not-found': ['1952100888']}

Or something similar, if you get the idea.

MarcoTC
Subtitles Admin
Posts: 44
Joined: Sat Jun 13, 2015 5:15 am

Re: 410 [CRITICAL ERROR/ Subtitle file not found on hdd

Wed Dec 16, 2015 9:00 am

You should test on the various Status codes.
410 is an error that isn't handled. An 'unknown/other' error.

See the status codes at the bottom: http://trac.opensubtitles.org/projects/ ... iki/XMLRPC

Returning a Status 200 while an error occurred is a very bad practice and will break tools that are currently using the API.

Return to “Developing”

Who is online

Users browsing this forum: Amazon [Bot] and 22 guests