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

archinstall crashing #1784

Closed
stallonen opened this issue May 4, 2023 · 9 comments · Fixed by #1787
Closed

archinstall crashing #1784

stallonen opened this issue May 4, 2023 · 9 comments · Fixed by #1787

Comments

@stallonen
Copy link

Here's the traceback

Traceback (most recent call last):
  File "/usr/bin/archinstall", line 5, in <module>
    from archinstall import run_as_a_module
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 5, in <module>
    from .lib import disk
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/__init__.py", line 1, in <module>
    from .device_handler import device_handler, disk_layouts
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 16, in <module>
    from .device_model import (
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_model.py", line 849, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1223, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1213, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'archinstall.lib.disk.device_model.Size'> for field size is not allowed: use default_factory
@svartkanin
Copy link
Collaborator

You're using python 3.11 archinstall requires 3.10

@stallonen
Copy link
Author

You're using python 3.11 archinstall requires 3.10

I apologise if this is a bad question, but can you guide me on how to use python 3.10 instead of 3.11?

@Torxed
Copy link
Member

Torxed commented May 4, 2023

v2.5.6 should be built against Python 3.11 so as long as the May ISO uses Py3.11 we should be good. Best option is to pacman -Syu atm

@svartkanin
Copy link
Collaborator

Ohh I wasn't aware of the upgrade on the iso

@stallonen
Copy link
Author

Here's the traceback

Traceback (most recent call last):
  File "/usr/bin/archinstall", line 5, in <module>
    from archinstall import run_as_a_module
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 5, in <module>
    from .lib import disk
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/__init__.py", line 1, in <module>
    from .device_handler import device_handler, disk_layouts
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 16, in <module>
    from .device_model import (
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_model.py", line 849, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1223, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1213, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'archinstall.lib.disk.device_model.Size'> for field size is not allowed: use default_factory

I am getting this error after building the iso directly from the build_iso script provided in the repo. Am I doing anything wrong?

@svartkanin
Copy link
Collaborator

Gotcha, I'll have a look qt it, I don't think it's compatible with python 3.11 just yet

@stallonen
Copy link
Author

Gotcha, I'll have a look qt it, I don't think it's compatible with python 3.11 just yet

Thank you!

@Torxed
Copy link
Member

Torxed commented May 4, 2023

Ohh I wasn't aware of the upgrade on the iso

Just verified, it's still Python 3.10 on the ISO, so upgrading archinstall might cause issues. I say might because the entrypoint in /usr/bin/archinstal is version agnostic, but the way Python handles plugins and pkg_resources might cause issues anyway.

I unfortunately only have access to a weird wifi setup right now so can't get networking up and running to do pacman -Syu in the ISO.

But May iso contains:

  • Python 3.10
  • archinstall 2.5.5

I would say that they have to do a full upgrade to get all the hooks right.

@svartkanin
Copy link
Collaborator

Alright that's good, I'll run it through 3.11 over the weekend and see if I can get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants