Upload of annotations with overwrite=true does not work

Open
#214 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start at the project.single_upload call shown in the issue and trace how annotation uploads handle overwrite. Reproduce the case with an already annotated image, then verify that overwrite=True is passed as the API query parameter and that the annotation upload succeeds.

Written by the indexing model from the issue text.

Description

Hello, I'm using your example:

out = project.single_upload(
        image_path=im_path,
        annotation_path=annot_path,
        annotation_labelmap=class_path,
        overwrite=True, num_retry_uploads=4
    )

on an image that I have already uploaded with an annotation previously. However, the out variable has the value:

{'image': {'duplicate': True, 'id': '5L3NfNHRHfZr06q6ojvv'}, 'annotation': {'error': UploadError("save annotation for 5L3NfNHRHfZr06q6ojvv / bad response: 400: {'message': 'Image was already annotated.', 'type': 'InvalidImageException', 'hint': 'This image was already annotated; to overwrite the annotation, pass overwrite=true as a query parameter.'}")}}

It seems the overwrite variable does nothing in this function, or is there another place I need to set this overwrite=true?

Dominant language
Python
Stars
642
Forks
146
Avg merge
1d 10h
Merged PRs (30d)
13

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from roboflow/roboflow-python

All issues in roboflow/roboflow-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.