TypeError: attrib() got an unexpected keyword argument 'factory'

Hi there,

I was trying to install HA on Raspberry PI using manual process described on:

All points went well but one, the last one where I’m running HA using hass command. It’s giving me the python error:

Traceback (most recent call last):
  File "/srv/homeassistant/bin/hass", line 11, in <module>
    sys.exit(main())
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/__main__.py", line 371, in main
    args = get_arguments()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/__main__.py", line 103, in get_arguments
    import homeassistant.config as config_util
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/config.py", line 15, in <module>
    from homeassistant import auth
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/auth/__init__.py", line 15, in <module>
    from . import auth_store, models
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/auth/auth_store.py", line 12, in <module>
    from . import models
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/auth/models.py", line 17, in <module>
    @attr.s(slots=True)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/auth/models.py", line 22, in User
    id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
TypeError: attrib() got an unexpected keyword argument 'factory'

Is there any known solution?

1 Like

I have this problem too

1 Like

Same issue here after manual update

Error message below:

Traceback (most recent call last):
File “/srv/homeassistant/bin/hass”, line 11, in
sys.exit(main())
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/main.py”, line 371, in main
args = get_arguments()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/main.py”, line 103, in get_arguments
import homeassistant.config as config_util
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/config.py”, line 15, in
from homeassistant import auth
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/auth/init.py”, line 8, in
import jwt
File “/srv/homeassistant/lib/python3.5/site-packages/jwt/init.py”, line 19, in
from .api_jwt import (
File “/srv/homeassistant/lib/python3.5/site-packages/jwt/api_jwt.py”, line 12, in
from .api_jws import PyJWS
File “/srv/homeassistant/lib/python3.5/site-packages/jwt/api_jws.py”, line 11, in
from .algorithms import (
File “/srv/homeassistant/lib/python3.5/site-packages/jwt/algorithms.py”, line 8, in
from .utils import (
File “/srv/homeassistant/lib/python3.5/site-packages/jwt/utils.py”, line 8, in
from cryptography.hazmat.primitives.asymmetric.utils import (
File “/srv/homeassistant/lib/python3.5/site-packages/cryptography/hazmat/primitives/asymmetric/init.py”, line 12, in
@six.add_metaclass(abc.ABCMeta)
AttributeError: module ‘six’ has no attribute ‘add_metaclass’

Uninstalling six and reinstalling it in the virtual env fixed the issue.

pip uninstall six
pip install six

Regards

It doesn’t work, furthermore is complicated to uninstall six, due to a lot dependencies.
Downgrade to 0.79.x at the moment is a workaround