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

Circular import in HACS validate action #1629

Closed
4 of 6 tasks
MatthewFlamm opened this issue Nov 5, 2020 · 2 comments
Closed
4 of 6 tasks

Circular import in HACS validate action #1629

MatthewFlamm opened this issue Nov 5, 2020 · 2 comments
Labels
issue:backend For issues with the backend/integration

Comments

@MatthewFlamm
Copy link

Installation details

Description Value
HACS version
Home Assistant version
Installation method for HA

Checklist

Describe the issue

Hacs validate action now creates a circular import.

#1623 changed the order of importing in the module that has the ultimate circular import sequence. Im not sure if the fix should rather be in homeassistant to prevent the circular import. Let me know if this issue should be there instead.

Steps to reproduce

  1. Have HACS validate action run for integration

Debug logs

https://github.com/MatthewFlamm/nwsradar/runs/1355799164?check_suite_focus=true#step:4:24



Traceback (most recent call last):
  File "/hacs/action.py", line 10, in <module>
    from custom_components.hacs.hacsbase.configuration import Configuration
  File "/hacs/custom_components/hacs/__init__.py", line 13, in <module>
    from .operational.setup import (
  File "/hacs/custom_components/hacs/operational/setup.py", line 8, in <module>
    from homeassistant.helpers.event import async_call_later
  File "/usr/lib/python3.8/site-packages/homeassistant/helpers/event.py", line 48, in <module>
    from homeassistant.helpers.template import RenderInfo, Template, result_as_boolean
  File "/usr/lib/python3.8/site-packages/homeassistant/helpers/template.py", line 34, in <module>
    from homeassistant.helpers import config_validation as cv, location as loc_helper
  File "/usr/lib/python3.8/site-packages/homeassistant/helpers/config_validation.py", line 534, in <module>
    def template(value: Optional[Any]) -> template_helper.Template:
AttributeError: partially initialized module 'homeassistant.helpers.template' has no attribute 'Template' (most likely due to a circular import)
@MatthewFlamm MatthewFlamm added the issue:backend For issues with the backend/integration label Nov 5, 2020
@hacs-bot
Copy link

hacs-bot bot commented Nov 5, 2020

Make sure you have read the issue guidelines and that you filled out the entire template.

@MatthewFlamm
Copy link
Author

#1628 was submitted near simultaneously

@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue:backend For issues with the backend/integration
Projects
None yet
Development

No branches or pull requests

1 participant