Skip to content

Can't Create Images Export #36

@CJavier11

Description

@CJavier11

Hello,

The export of annotations functions as expected, whereas exporting images seems to be broken. I am able to export and download annotations leveraging my polling logic, however when choosing IMAGES for an export format, it then expects images, which is not allowed. Given this is just creating the export link in hasty, exporting images should work. Please assist, thanks.

project = hasty_client.get_project(project_id)
export_job = project.export(name="MyExport", export_format="IMAGES", dataset=dataset_id)
poll_export_job_status(export_job)

---------------------------------------------------------------------------
ValidationException                       Traceback (most recent call last)
[<ipython-input-4-ce41f910cf5f>](https://localhost:8080/#) in <cell line: 5>()
      3 project = hasty_client.get_project(project_id)
      4 
----> 5 export_job = project.export(name="MyExport", export_format="IMAGES", dataset=dataset_id)
      6 
      7 def poll_export_job_status(export_job):

[/usr/local/lib/python3.10/dist-packages/hasty/project.py](https://localhost:8080/#) in export(self, name, export_format, dataset, image_status, sign_urls, semantic_format, labels_order)
    342         """
    343         if export_format not in VALID_EXPORT_FORMATS:
--> 344             raise ValidationException(f"Wrong export format {export_format}, expected one of {VALID_EXPORT_FORMATS}")
    345         dataset_ids = []
    346         if dataset:

ValidationException: Wrong export format IMAGES, expected one of ['json_v1.1', 'semantic_png', 'json_coco', 'images']
project = hasty_client.get_project(project_id)
export_job = project.export(name="MyExport", export_format="images", dataset=dataset_id)
poll_export_job_status(export_job)

ValidationException: request body has an error: doesn't match the schema: Error at "/format": value "images" is not one of the allowed values
Schema:
  {
    "description": "Export format. Videos projects only support json_v1.1",
    "enum": [
      "json_v1.1",
      "semantic_png",
      "json_coco",
      "json_coco",
      "pascal",
      "videos"
    ],
    "example": "json_v1.1",
    "type": "string"
  }

Value:
  "images"

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