You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing Lisa according to the instructions, I run the hello world example and got the following error:
$ lisa
Traceback (most recent call last):
File "/home/tvuong/.local/bin/lisa", line 5, in<module>
from lisa.main import cli
File "/datadrive/projects/lisa/lisa/main.py", line 16, in<module>
import lisa.mixin_modules # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/datadrive/projects/lisa/lisa/mixin_modules.py", line 60, in<module>
import lisa.sut_orchestrator.libvirt.ch_platform # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/datadrive/projects/lisa/lisa/sut_orchestrator/libvirt/ch_platform.py", line 15, in<module>
from lisa.sut_orchestrator.libvirt.context import (
File "/datadrive/projects/lisa/lisa/sut_orchestrator/libvirt/context.py", line 53, in<module>
@dataclass
^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 1268, in dataclass
return wrap(cls)
^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 1258, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 994, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 852, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <enum 'GuestVmType'>for field guest_vm_type is not allowed: use default_factory
GuestVmType is unhashable, so Python is complaining because it detects an unhashable default parameter in NodeContext (see dataclasses doc). This seems to come from a change since Python version 3.11. A solution would be to remove the @dataclass decorator from GuestVmType definition, or use default_factory as suggested in the error message.
The text was updated successfully, but these errors were encountered:
After installing Lisa according to the instructions, I run the hello world example and got the following error:
GuestVmType
is unhashable, so Python is complaining because it detects an unhashable default parameter inNodeContext
(see dataclasses doc). This seems to come from a change since Python version 3.11. A solution would be to remove the@dataclass
decorator fromGuestVmType
definition, or usedefault_factory
as suggested in the error message.The text was updated successfully, but these errors were encountered: