Forums

500 Internal Server Error

We are using the XMLHttpRequest AJAX API to send data from different websites to our server in PythonAnywhere. Something odd happens: depending on the website, either we send successfully or we get this error

POST https://canecto.pythonanywhere.com/api/ 500 (Internal Server Error)

even though the same code is loaded.

Is there any explanation for this behaviour?

We have fix the problem. This answer provides the solution.

In short: if still using Python < 2.7.9 requests need pyopenssl package to work with SSL certificate verification.

Have a look in your error log. You should find stacktraces there that will show you what's going wrong.