Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'X-Ratelimit-Limit' #114135

Closed
UK-JustinSmall opened this issue Mar 24, 2024 · 2 comments · Fixed by #115272
Closed

KeyError: 'X-Ratelimit-Limit' #114135

UK-JustinSmall opened this issue Mar 24, 2024 · 2 comments · Fixed by #115272

Comments

@UK-JustinSmall
Copy link

The problem

Log Details (ERROR)
Logger: homeassistant.components.forecast_solar
Source: helpers/update_coordinator.py:318
integration: Forecast.Solar (documentation, issues)
First occurred: 18:15:19 (2 occurrences)
Last logged: 19:15:19

Unexpected error fetching forecast_solar data: 'X-Ratelimit-Limit'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/forecast_solar/coordinator.py", line 67, in _async_update_data
return await self.forecast.estimate()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/forecast_solar/init.py", line 156, in estimate
data = await self._request(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/forecast_solar/init.py", line 128, in _request
self.ratelimit = Ratelimit.from_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/forecast_solar/models.py", line 211, in from_response
limit = int(response.headers["X-Ratelimit-Limit"])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'X-Ratelimit-Limit'

What version of Home Assistant Core has the issue?

2024.3.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @klaasnicolaas, @frenck, mind taking a look at this issue as it has been labeled with an integration (forecast_solar) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of forecast_solar can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign forecast_solar Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


forecast_solar documentation
forecast_solar source
(message by IssueLinks)

@klaasnicolaas
Copy link
Member

This problem has already been solved in the Python package, but there has not yet been a version bump for the Home Assistant integration.

./Klaas

@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants