Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Handle broken job log nicely #1332

@JabLuszko

Description

@JabLuszko
Traceback (most recent call last):
> File "/home/ubuntu/MAD/start.py", line 262, in <module>
    asyncio.run(start(), debug=True)
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/ubuntu/MAD/start.py", line 150, in start
    await device_updater.start_updater()
  File "/home/ubuntu/MAD/mapadroid/updater/updater.py", line 83, in start_updater
    await self._load_log()
  File "/home/ubuntu/MAD/mapadroid/updater/updater.py", line 68, in _load_log
    issued_job: GlobalJobLogEntry = self._global_job_log_entry_schema.load(issued_job_raw)
  File "/home/ubuntu/mad_env/lib/python3.9/site-packages/marshmallow_dataclass/__init__.py", line 752, in load
    all_loaded = super().load(data, many=many, **kwargs)
  File "/home/ubuntu/mad_env/lib/python3.9/site-packages/marshmallow/schema.py", line 722, in load
    return self._do_load(
  File "/home/ubuntu/mad_env/lib/python3.9/site-packages/marshmallow/schema.py", line 909, in _do_load
    raise exc
marshmallow.exceptions.ValidationError: {'auto_command_settings': {'start_with_init': ['Missing data for required field.'], 'redo_on_error': ['Missing data for required field.'], 'redo': ['Missing data for required field.'], 'algo_value': ['Missing data for required field.'], 'origins': ['Missing data for required field.'], 'job': ['Missing data for required field.']}} 

Catch this marshmallow.exceptions.ValidationError nicely, remove file, re-load empty file(?), show warning, start MAD normally.

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