Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

HTTP 500 Error since yesterday morning

Daniel Dec 28, 2016 06:13AM UTC

My Python Script on my Raspberry is running since weeks without any issue. But since yesterday, i got always an HTTP 500 Error. I tried to make an exception for this but without luck.
Is this a Server-problem or is there something wrong with the key?
I call the data every 10min - its running 2-3x an then i got the 500 error and my script crashes.
When i use the exception, i did not get data because it says, the key is wrong.
So what con i do for this problem.

Thanks for your help

Up 0 rated Down
Daniel Dec 28, 2016 06:26AM UTC
addition:

my api-call in Python looks like this:

owm = pyowm.OWM("KEY") and this was working until yesterday.

Then i tried to implement an exception to check if the database is responding:

urllib2.urlopen("http://api.openweathermap.org/data/2.5/weather?&appid=KEY")

and this is not working
Up 0 rated Down
Daniel Dec 28, 2016 06:38AM UTC
addition 2:
And this is the Error:

pyowm.exeptions.api_call_error.APICallError: Exception in calling OWM web API.
Reason: HTTP Error 500: Internal Server Error
Caused by: HTTP Error 500: Internal Server Error
Up 0 rated Down
Maxim Gushcho Dec 28, 2016 01:09PM UTC OpenWeatherMap Agent

Hello,

This is an internal error. This does not relate to the availability our service.
You need to check next things:
A Permissions Error.
In most cases, a 500 Internal Server Error is due to an incorrect permission on one or more files or folders. In most of those cases, an incorrect permission on a PHP and CGI script is to blame. These should usually be set at 0775 (-rwxr-xr-x).
Also it could be a coding error in .htaccess. While not as common, be sure to check that your site’s .htaccess file is properly structured.

Up 0 rated Down
Daniel Dec 28, 2016 01:48PM UTC
Hi Maxim,
thanks for this hint - i will check that or better reinstall Raspian and do all from scratch ;-)
Up 0 rated Down
Daniel Dec 29, 2016 10:43AM UTC
So, after hours of testing, there is no luck so i post the full Error-Message:

Traceback (most recent call last):
File "wetter5.py", line 267, in <module>
wetter()
File "wetter5.py", line 70, in wetter
observation = owm.weather_at_id(2778690)
File "usr/local/lib/python2.7/dist-packages/pyowm/webapi25/owm25.py", line 234, in weather_at_id 'lang': self._language})
File "usr/local/lib/python2.7/dist-packages/pyowm/commons/owmhttpclient.py", line 74, in call_API rais api_call_error.APICallError)str(e), e)
pyowm.exceptions.api_call_error.APICallError: Exception in calling OWM web API.
Reason: HTTP Error 500: Internal Server Error
Caused by: HTTP Error 500: Internal Server Error

And now, two funny things:

1) I call the api over:
owm = pyowm.OWM("KEY")
but there is no parameter for the language. How can i define the language?
The Documentation dosnt say how, so i need advice please.

2) The file "owmhttpclient.py" dosnt exist, so the API is calling a non existing file?

Please check this Error-Message and give me a hint, how to fix this problem.

Thanks and regards
Daniel

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete