Hi all.
Ive got a dev envionrnt up and running and i can connect to HA.
When trying to use the scaffold script to create a new integration, i get the below error
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/home-assistant/script/scaffold/__main__.py", line 98, in <module>
sys.exit(main())
File "/usr/home-assistant/script/scaffold/__main__.py", line 49, in main
info = gather_info.gather_info(args)
File "/usr/home-assistant/script/scaffold/gather_info.py", line 22, in gather_info
info = _gather_info(
File "/usr/home-assistant/script/
scaffold/gather_info.py", line 153, in _gather_info
if not validator(value):
File "/usr/home-assistant/script/scaffold/gather_info.py", line 30, in <lambda>
lambda value: value == slugify(value),
File "/usr/home-assistant/homeassistant/util/__init__.py", line 49, in slugify
return unicode_slug.slugify(text, separator="_") # type: ignore
TypeError: slugify() got an unexpected keyword argument 'separator'
FWIW, looks like that piece of code was last modified quite a while ago:
So nothing new there.
I took a look at the source of unicode_slug.slugify (which is actually from the python-slugify package), and it does have separator as a keyword parameter.
It looks like maybe your installation is pulling in the wrong package for slugify. Are you sure you installed your dev environment correctly, and activated the venv?
I’m not sure I understand. If you install and activate correctly, you shouldn’t have to install python-slugify. That should be done automatically when you run script/setup.
I had to install a number of python packages for setup to complete. Obviously something has gone wrong somewhere. Maybe I’ll just blow it away and start again.
I’m not sure what most developers do, but I’ve gotten into this habit when updating my checkout:
git clean -fdx -e venv
rm -rf .tox
script/setup
Sometimes script/setup results in errors, which sometimes I try to fix manually (by deleting whatever package(s) seem(s) to be causing the problem and re-running script/setup) or by simply deleting the venv dir and recreating it.