Skip to content

Bug in derive #1

@nicolas-popsize

Description

@nicolas-popsize

Hi,
for some picture

src/garmentiq/landmark/derivation/derive_keypoint_coord.py
def derive_keypoint_coord(...) -> Optional[Tuple[float, float]] returns float

So src/garmentiq/landmark/derive.py
derived_coord = tuple(float(x) for x in process(**args)) returns error:

    metadata, outputs = tailor.measure(
  File "xxxxxxxxxxxxx/garmentiq/tailor.py", line 641, in measure
    derived_coords, updated_detection_dict = self.derive(
  File "xxxxxxxxxxxxx/garmentiq/tailor.py", line 312, in derive
    derived_coords, updated_detection_dict = landmark.derive(
  File "xxxxxxxxxxxxx/garmentiq/landmark/derive.py", line 41, in derive
    derived_coord = tuple(float(x) for x in process(**args))
TypeError: 'NoneType' object is not iterable

I think the code of should handle the case where return type of derive_keypoint_coord is None, as the return type is Optional[...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions