roboflow / roboflow/roboflow-python

Upload of annotations with overwrite=true does not work

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

Nobody has claimed this yet.

Dominant language
Python
Stars
629
Forks
140
Avg merge
2d 2h
Merged PRs (30d)
5

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?

Contributor guide

Open the contributing guide

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.