Skip to content

configuration GUI error when clearing "Minimum size under which backup is considered failed" value #156

@GuitarBilly

Description

@GuitarBilly

npbackup 3.0.2-dev-linux-gui-x64-legacy-public-3.10-i 2025040401
Ubuntu 22.04.2 LTS

( i was trying to reset the value in the assumption that the Group inherited value would appear instead of the current Repo value. )

steps to reproduce

  1. open configuration

  2. select a repo

  3. empty the box with value "Minimum size under which backup is considered failed"
    Image

  4. select any Repo in the "select configuration object" dropdown box
    Image

  5. enjoy the error:
    Image

after pressing OK npbackup-gui will crash and exit:

2025-04-16 18:28:27,931 :: INFO :: Launching configuration GUI
2025-04-16 18:31:27,887 :: CRITICAL :: GUI Execution error Given string "" cannot be converted to bytes
2025-04-16 18:31:27,887 :: INFO :: Trace:
Traceback (most recent call last):
  File "/home/linux/npbackup.latest.github/npbackup/npbackup/gui/__main__.py", line 1274, in main_gui
    _main_gui(viewer_mode=viewer_mode)
  File "/home/linux/npbackup.latest.github/npbackup/npbackup/gui/__main__.py", line 1168, in _main_gui
    full_config = config_gui(full_config, config_file)
  File "/home/linux/npbackup.latest.github/npbackup/npbackup/gui/config.py", line 2449, in config_gui
    full_config = update_config_dict(
  File "/home/linux/npbackup.latest.github/npbackup/npbackup/gui/config.py", line 846, in update_config_dict
    == BytesConverter(value).bytes
  File "/home/linux/npbackup.latest.github/npbackup/venv/lib/python3.10/site-packages/ofunctions/misc/__init__.py", line 404, in __new__
    raise ValueError(
ValueError: Given string "" cannot be converted to bytes
2025-04-16 18:31:27,900 :: INFO :: ExecTime = 0:11:42.576405, finished, state is: critical.

expected behaviour

npbackup to not crash, restore the value enherited from the group setting, or provide a warning / error that it is not allowed to clear the box.

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