Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Create Images Export #36

Open
CJavier11 opened this issue Feb 21, 2024 · 0 comments
Open

Can't Create Images Export #36

CJavier11 opened this issue Feb 21, 2024 · 0 comments

Comments

@CJavier11
Copy link

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant