My code to create a list for a user is not working. To confirm my understanding of the code, I tried sending the request using curl and am getting the same response as my code: 500 Internal Server Error. Here's my curl command:
curl -i -X POST 'https://api.themoviedb.org/3/list?api_key=my_api_key&session_id=my_session_id -d 'name=fred&description=flintstone'
Perhaps you can tell me why this command doesn't work. BTW, if I use a bad my_api_key, it gives me an Invalid API key error. If I use a bad my_session_id, it gives me an Authentication failed error. If I omit one or both of the name or description parameters, it gives me an Invalid parameters error. Only if I include all the correct parameters and the name and description payload body does it give me the 500 Internal Server Error.
لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها
هل تريد تقييم او اضافة هذا العنصر للقائمة؟
لست عضو؟
رد بواسطة Travis Bell
بتاريخ مايو 11, 2014 في 10:25 صباحا
Hi celiao,
You need to pass the name and description in as valid JSON. There's a cURL example in the docs:
Cheers.
رد بواسطة celiao
بتاريخ مايو 11, 2014 في 1:33 مساءا
Previously, I also tried passing the name and description as JSON and received a 500 Internal Server Error:
So, I tried using the format in the cURL example:
This also produces a 500 Internal Server Error.
I am able to make other POST request calls, with parameters and payloads, with my code and with cURL, without errors. Only this list creation method is giving me trouble. Any more clues? Thanks.
رد بواسطة celiao
بتاريخ يونيو 9, 2014 في 6:02 مساءا
Would you mind looking at this issue again? Please take a look at my curl command and see if you can figure out what I'm doing incorrectly. Thanks!
رد بواسطة celiao
بتاريخ يوليو 11, 2014 في 9:26 مساءا
Now, for some reason, I'm getting an HTTP 404 Not Found error and status code of 34, which is not on the list of status codes: https://www.themoviedb.org/documentation/api/status-codes.
Any clues that help me get this working would be appreciated.
رد بواسطة Travis Bell
بتاريخ يوليو 12, 2014 في 12:23 مساءا
Hi celiao,
34 was recently added, it’s just the status code for a 404 when the controller action doesn’t exist (I’ll have to update the website docs).
This particular issue is the trailing / you have at the of your URL.
Fixes that.
I am seeing a 500 error though, and will take a look at this when I get back into the office on Monday. I’ve created a ticket for this issue here.
رد بواسطة celiao
بتاريخ يوليو 12, 2014 في 12:41 مساءا
Makes sense. I was receiving a 500 error with my Python code too, so it would be great to get this resolved.
In addition, you might want to add
not
to the error message:رد بواسطة LordMike
بتاريخ سبتمبر 18, 2014 في 1:18 مساءا
Just wanted to chime in and report that this still seems to be an issue.
We're issuing a:
And get back:
رد بواسطة Travis Bell
بتاريخ سبتمبر 18, 2014 في 1:29 مساءا
Hey Mike,
Yup, ticket for this is here: http://tmdb.lighthouseapp.com/projects/83077/tickets/405-creating-new-lists-seems-to-fail-when-it-should-work
It's close to (finally) being the next thing I look at.
رد بواسطة Travis Bell
بتاريخ سبتمبر 22, 2014 في 3:06 مساءا
Hey guys,
Lists should be create able again. Can you let me know how you make out?
رد بواسطة celiao
بتاريخ سبتمبر 22, 2014 في 7:41 مساءا
Fantastic, Travis!
tmdbsimple now passes all it's tests under Python 2.7.6, 3.3.5, and 3.4.0.