ChristopherJohnston / octopus_energy

MIT License
1 stars 0 forks source link

rate limit exceeded #8

Closed peland closed 1 month ago

peland commented 1 month ago

Worked fine for a few days, then I started getting this error. I tried it two days in a row so far. There are two sites, south and west facing arrays on my roof. If it helps I could split the list comprehension to find out which it's failing on.

python3 ElmBankSolar.py Traceback (most recent call last): File "/Users/peland/Documents/pp/ElmBankSolar.py", line 125, in forecasts = [site.get_forecasts() for site in sites] File "/Users/peland/Documents/pp/ElmBankSolar.py", line 125, in forecasts = [site.get_forecasts() for site in sites] File "/Users/peland/Library/Python/3.9/lib/python/site-packages/pysolcast/rooftop.py", line 21, in get_forecasts return self._get_data(self._create_uri(self.base_uri, endpoint), params) File "/Users/peland/Library/Python/3.9/lib/python/site-packages/pysolcast/base.py", line 39, in _get_data raise RateLimitExceeded( pysolcast.exceptions.RateLimitExceeded: Rate limit exceeded. Reset time: None

peland commented 1 month ago

Update: it started working again and I dismissed it as a server problem, but I just tried it again and on the third or fourth call I got the same error.

ChristopherJohnston commented 1 month ago

From the trace, it Looks like the rate limit exceeded error is being thrown by pysolcast rather than octopus energy. You should probably look there.

File "/Users/peland/Library/Python/3.9/lib/python/site-packages/pysolcast/base.py", line 39, in _get_data raise RateLimitExceeded( pysolcast.exceptions.RateLimitExceeded: Rate limit exceeded. Reset time: None

peland commented 1 month ago

I'm beginning to suspect I have a (very small) quota on the server, could that be the case? Or am I somehow making far more requests than I think I am?

peland commented 1 month ago

Oops! Your reply appeared as I typed and I didn't notice - I'll follow that up, thanks!

peland commented 1 month ago

My apologies, I thought I was posting on the pysolcast page!