2012-09-05, 00:50
This also happens to me.
I setup debugging and, after looking at the source code, have put a minimal repro (below) script in python (removed my email and password):
Sure enough, this prints "Unexpected error." which is the message shown in the Apple TV.
After changing the line:
to:
I get the following output:
Something went wrong on the server while serving the request.
I installed HTTPScoop and got the following full response:
So, this appears something that should be fixed on the server. Unless it has something to do with the data passed into it. If the password is wrong the line:
is executed correctly. So the server is doing something correct. It fails when the checks pass.
I setup debugging and, after looking at the source code, have put a minimal repro (below) script in python (removed my email and password):
Code:
import urllib
import urllib2
__apiurl__ = 'http://sharethe.tv/api/'
params = "<user>"
params += " <version>1.1.0</version>"
params += " <email>(removed)</email>"
params += " <password>(removed)</password>"
params += " <movies>"
params += " <movie>"
params += " <imdb>tt1601913</imdb>"
params += " <title>The Grey</title>"
params += " <year>2012</year>"
params += " </movie>"
params += " </movies>"
params += "</user>"
req = urllib2.Request(url=__apiurl__, data=params, headers={'Content-Type': 'application/xml'})
try:
response = urllib2.urlopen(req)
except urllib2.URLError, e:
try:
if e.code == 202:
print "Library update sent."
elif e.code == 204:
print "Empty movie library so not sending update."
elif e.code == 401:
print "Authentication failed."
elif e.code == 403:
print "Please update your addon before submitting."
else:
print "Unexpected error."
except AttributeError:
print "Unable to contact server but try again soon."
Sure enough, this prints "Unexpected error." which is the message shown in the Apple TV.
After changing the line:
Code:
print "Unexpected error."
to:
Code:
print e
I get the following output:
Quote:HTTP Error 500: Internal Server Error
Something went wrong on the server while serving the request.
I installed HTTPScoop and got the following full response:
Code:
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
</div>
</body>
</html>
So, this appears something that should be fixed on the server. Unless it has something to do with the data passed into it. If the password is wrong the line:
Code:
print "Authentication failed."
is executed correctly. So the server is doing something correct. It fails when the checks pass.