core icon indicating copy to clipboard operation
core copied to clipboard

Hassfest is broken for fresh dev setup: ModuleNotFoundError: No module named 'black'

Open ginkel opened this issue 2 years ago • 0 comments

The problem

After setting up a manual dev environment according to https://developers.home-assistant.io/docs/development_environment/ running python3 -m script.scaffold integration throws an exception:

(venv)  ~/workspace/home-assistant-core $ python3 -m script.scaffold integration

What is the domain?
> automation

Running hassfest to pick up new information.
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/tg/workspace/home-assistant-core/script/hassfest/__main__.py", line 7, in <module>
    from . import (
  File "/home/tg/workspace/home-assistant-core/script/hassfest/application_credentials.py", line 4, in <module>
    import black
ModuleNotFoundError: No module named 'black'

Running gen_requirements_all to pick up new information.

Running script/translations_develop to pick up new translation strings.


**************************


Integration code has been generated

The next step is to look at the files and deal with all areas marked as TODO.

I am aware of https://github.com/home-assistant/core/issues/79248, but this looks as if script/setup does not install the black module. Manually installing it using pip install black immediately resolves the issue.

What version of Home Assistant Core has the issue?

git-5884f50a82

What was the last working version of Home Assistant Core?

core-2022.9.7, according to #79248

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

https://developers.home-assistant.io/docs/development_environment/

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

ginkel avatar Nov 06 '22 11:11 ginkel