Skip to content

Error when 'annotator': null or 'annotation': null in yaml #85

@MaelleTtrt

Description

@MaelleTtrt

When I don't specify annotator and annotation in the yaml I obtain the following error

Traceback (most recent call last):
  File "C:\Users\torterma\Documents\Projets_Osmose\Git\post_processing_detections\.venv\Lib\site-packages\IPython\core\interactiveshell.py", line 3699, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ipython-input-13-a588630b2c67>", line 2, in <module>
    data = DataAplose.from_yaml(file=yaml_file, concat=True)
  File "C:\Users\torterma\Documents\Projets_Osmose\Git\post_processing_detections\src\post_processing\dataclass\data_aplose.py", line 482, in from_yaml
    return cls.from_filters(filters, concat=concat)
           ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\torterma\Documents\Projets_Osmose\Git\post_processing_detections\src\post_processing\dataclass\data_aplose.py", line 509, in from_filters
    cls_list = [cls(load_detections(fil)) for fil in filters]
                    ~~~~~~~~~~~~~~~^^^^^
  File "C:\Users\torterma\Documents\Projets_Osmose\Git\post_processing_detections\src\post_processing\utils\filtering_utils.py", line 359, in load_detections
    df = filter_by_annotator(df, annotator=filters.annotator)
  File "C:\Users\torterma\Documents\Projets_Osmose\Git\post_processing_detections\src\post_processing\utils\filtering_utils.py", line 89, in filter_by_annotator
    invalid = [a for a in annotator if a not in list_annotators]
                          ^^^^^^^^^
TypeError: 'NoneType' object is not iterable

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