Navigation Menu

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

Python Astral package has been updated: sun sensor fails to start #31793

Closed
fschwinger opened this issue Feb 13, 2020 · 4 comments
Closed

Python Astral package has been updated: sun sensor fails to start #31793

fschwinger opened this issue Feb 13, 2020 · 4 comments
Assignees

Comments

@fschwinger
Copy link

The problem

The python astral package has recently been updated. Arch Linux ships with version 2.1 at the moment which seems to be incompatible with Home Assistant.

Environment

  • Home Assistant release with the issue: 0.105.3
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.): Arch Linux
  • Integration causing this issue: sun
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/sun

Problem-relevant configuration.yaml

sun:

Traceback/Error logs

Feb 13 16:59:00 hass hass[1903]: 2020-02-13 16:59:00 ERROR (MainThread) [homeassistant.setup] Error during setup of component sun
Feb 13 16:59:00 hass hass[1903]: Traceback (most recent call last):
Feb 13 16:59:00 hass hass[1903]:   File "/usr/lib/python3.8/site-packages/homeassistant/setup.py", line 169, in _async_setup_component
Feb 13 16:59:00 hass hass[1903]:     result = await component.async_setup(  # type: ignore
Feb 13 16:59:00 hass hass[1903]:   File "/usr/lib/python3.8/site-packages/homeassistant/components/sun/__init__.py", line 82, in async_setup
Feb 13 16:59:00 hass hass[1903]:     Sun(hass)
Feb 13 16:59:00 hass hass[1903]:   File "/usr/lib/python3.8/site-packages/homeassistant/components/sun/__init__.py", line 106, in __init__
Feb 13 16:59:00 hass hass[1903]:     update_location(None)
Feb 13 16:59:00 hass hass[1903]:   File "/usr/lib/python3.8/site-packages/homeassistant/components/sun/__init__.py", line 103, in update_location
Feb 13 16:59:00 hass hass[1903]:     self.location = get_astral_location(self.hass)
Feb 13 16:59:00 hass hass[1903]:   File "/usr/lib/python3.8/site-packages/homeassistant/helpers/sun.py", line 22, in get_astral_location
Feb 13 16:59:00 hass hass[1903]:     from astral import Location
Feb 13 16:59:00 hass hass[1903]: ImportError: cannot import name 'Location' from 'astral' (/usr/lib/python3.8/site-packages/astral/__init__.py)

Additional information

@probot-home-assistant
Copy link

Hey there @Swamp-Ig, mind taking a look at this issue as its been labeled with a integration (sun) you are listed as a codeowner for? Thanks!

@balloob
Copy link
Member

balloob commented Feb 13, 2020

We hardcode the Astral package astral==1.10.1. You should only run HA Core with our packages in a virtual env or Docker or run Home Assistant.

@balloob balloob closed this as completed Feb 13, 2020
@fschwinger
Copy link
Author

Ok, thanks. I planned on migrating to a virtual env anyway.

@robbrad
Copy link

robbrad commented Feb 23, 2020

Im seeing this issue in my venv - astral-2.1.dist-info

How do I fix a version?

Ignore me - I made a HA upgrade script whitch upgrade pip packages also - and I think it ignored HA requirements. Fresh install and disabled pip package upgrades

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants