Skip to content

Unclear error with invalid metadata file #1145

Description

@ben-edna

When a metadatafile is in a merge set (with >>>>>>>>>>>>)

Then doing an dfetch check or update fails, but with an unclear message:

Traceback (most recent call last):
  File "C:\PROGRA~2\dfetch\__main__.py", line 101, in <module>
  File "C:\PROGRA~2\dfetch\__main__.py", line 95, in main
  File "C:\PROGRA~2\dfetch\__main__.py", line 82, in run
  File "C:\PROGRA~2\dfetch\dfetch\commands\update.py", line 95, in __call__
  File "C:\PROGRA~2\dfetch\dfetch\project\subproject.py", line 108, in update
  File "C:\PROGRA~2\dfetch\dfetch\project\subproject.py", line 81, in update_is_required
  File "C:\PROGRA~2\dfetch\dfetch\project\subproject.py", line 48, in check_wanted_with_local
  File "C:\PROGRA~2\dfetch\dfetch\project\subproject.py", line 327, in on_disk_version
  File "C:\PROGRA~2\dfetch\dfetch\project\metadata.py", line 91, in from_file
  File "C:\PROGRA~2\dfetch\yaml\__init__.py", line 125, in safe_load
  File "C:\PROGRA~2\dfetch\yaml\__init__.py", line 81, in load
  File "C:\PROGRA~2\dfetch\yaml\constructor.py", line 49, in get_single_data
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 36, in get_single_node
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 55, in compose_document
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 84, in compose_node
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 133, in compose_mapping_node
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 84, in compose_node
  File "C:\PROGRA~2\dfetch\yaml\composer.py", line 127, in compose_mapping_node
  File "C:\PROGRA~2\dfetch\yaml\parser.py", line 98, in check_event
  File "C:\PROGRA~2\dfetch\yaml\parser.py", line 428, in parse_block_mapping_key
  File "C:\PROGRA~2\dfetch\yaml\scanner.py", line 115, in check_token
  File "C:\PROGRA~2\dfetch\yaml\scanner.py", line 152, in need_more_tokens
  File "C:\PROGRA~2\dfetch\yaml\scanner.py", line 291, in stale_possible_simple_keys
yaml.scanner.ScannerError: while scanning a simple key
  in "D:\Projects\lvgl\.dfetch_data.yaml", line 5, column 1
could not find expected ':'
  in "D:\Projects\lvgl\.dfetch_data.yaml", line 6, column 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXNot broken, but frustrating/unclear for users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions