Skip to content

lsblk archinstall Python exception: pydantic validation error #3630

@fatalhalt

Description

@fatalhalt

Which ISO version are you using?

2025-06-01

The installation log

[2025-06-25 20:29:22] - DEBUG - Hardware model detected: ASUS All Series; UEFI mode: True
[2025-06-25 20:29:22] - DEBUG - Processor model detected: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
[2025-06-25 20:29:22] - DEBUG - Memory statistics: 22870796 available out of 24469904 total installed
[2025-06-25 20:29:22] - DEBUG - Could not detect virtual system: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

[2025-06-25 20:29:22] - DEBUG - System is not running in a VM: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

[2025-06-25 20:29:22] - DEBUG - Virtualization detected: None; is VM: False
[2025-06-25 20:29:22] - DEBUG - Graphics devices detected: dict_keys(['NVIDIA Corporation GM204 [GeForce GTX 980] (rev a1)'])
[2025-06-25 20:29:22] - ERROR - Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/archinstall/__init__.py", line 104, in run_as_a_module
    rc = main()
  File "/usr/lib/python3.13/site-packages/archinstall/__init__.py", line 82, in main
    _log_sys_info()
    ~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/archinstall/__init__.py", line 36, in _log_sys_info
    debug(f'Disk states before installing:\n{disk_layouts()}')
                                             ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/utils.py", line 105, in disk_layouts
    lsblk_output = get_lsblk_output()
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/utils.py", line 65, in get_lsblk_output
    return _fetch_lsblk_info()
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/utils.py", line 44, in _fetch_lsblk_info
    return LsblkOutput.model_validate_json(output)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pydantic/main.py", line 746, in model_validate_json
    return cls.__pydantic_validator__.validate_json(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        json_data, strict=strict, context=context, by_alias=by_alias, by_name=by_name
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
pydantic_core._pydantic_core.ValidationError: 4 validation errors for LsblkOutput
blockdevices.2.children.1.type
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type
blockdevices.3.children.1.type
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type
blockdevices.4.children.1.type
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type
blockdevices.5.children.1.type
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type

describe the problem

Python code responsible for parsing json output of lsblk is still subpar and not handling systems with software RAID or lots of disks/partitions

archinstall.log: https://0x0.st/8l9E.log
lsblk.json: https://0x0.st/8l96.json
lsblk txt: https://0x0.st/8l9I.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions