Pirate-Weather / pirateweather

Code and documentation for the Pirate Weather API
Apache License 2.0
619 stars 27 forks source link

500 Internal Server Error #258

Open clowncracker opened 6 days ago

clowncracker commented 6 days ago

Describe the issue

I have installed the integration via HACS. Starting today I've hit a weird error that I haven't had before: Tried to configure it the way I want, but then deleted and installed again with bare-minimum default configuration. When it loads, it shows on the Integrations page as the following:

Failed setup, will retry: 500, message='Internal Server Error', url=URL('https://api.pirateweather.net/forecast/xxxx/xxxx,xxxxunits=si&extend=hourly&version=2')

I uninstalling an resinstalling via HACS, tried creating a new API key, and I tried using the web URL with my latitude/longtitude and it does not work. When I made both of the numbers positive with the web url, it showed me a location in China. It looks like it's an issue with my location specifically.

Home Assistant version

2024.6.4

Integration version

1.5.2

Troubleshooting steps

zanish commented 6 days ago

I'm also seeing this behavior, I am on version 1.5.3 though. I backed up to 1.5.2 and had the same issue on that version as well.

skymoo commented 6 days ago

I was seeing this, and was in the middle of writing an update to this issue saying as much and then I reloaded HA (for the n’th time whilst encountering this) and it’s seems to be back now… So it looks like this may be fixed?

zanish commented 5 days ago

Like skymoo said, this morning refreshing my HA dash and PirateWeather is returning data so no longer having an issue myself.

cloneofghosts commented 5 days ago

This issue is an API issue which occurs on the first of every month and it seems to fix itself after a number of hours. (See #242 and #208) I've transferred this issue over to the API repository and will leave open for @alexander0042 to look into and fix.

alexander0042 commented 5 days ago

Shoot, I thought I fixed this last time, but clearly not! It’s a bug with the date time conversion, but really should have been fixed, so this is frustrating!

Regardless, this sort of downtime isn’t acceptable! Let’s keep this issue open and high priority until I get the test working again

cloneofghosts commented 4 days ago

Shoot, I thought I fixed this last time, but clearly not! It’s a bug with the date time conversion, but really should have been fixed, so this is frustrating!

What I find weird is that even though the fix didn't fully fix the issue from popping up again it seemed to be able to recover from the issue itself.

alexander0042 commented 4 days ago

Yea, it has to do with the datetime conversion when going back to the start of the day for the high/ low values. Shouldn't be difficult to fix, but irritating to get working correctly

cloneofghosts commented 4 days ago

Ah, that would explain why it would eventually fix itself after a period of time/