roboflow / roboflow/roboflow-python

Python API upload fails silently if targeted project does not exist but was before

Open
#302 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

Problem

Strange and buggy behavior with Python API when uploading images.

Steps to reproduce

I use Roboflow Python API to upload batches of images to be annotated.

I wrote a script that creates Roboflow client and uploads images, here's a simplified version:

import roboflow

IMAGE_PATH = "/path/to/images"
BATCH_NAME = "batch_name"

rf = roboflow.
ws = rf.workspace("my-workspace")
project = ws.project("my-project")

project.upload(image_path=IMAGE_PATH, batch_name=BATCH_NAME)

Logs show that in connects to workspace, finds the project and says my images are uploaded.

BUT, when I check the GUI I have no images in the annotate > Unassigned panel. More, using the CLI to check with roboflow project get my-project -w my-workspace there's nothing under "project":"unannotated"

Where it is very surprising is that if I open a python terminal (sourced with the same env !) and write line-by-line the preceeding code ... IT WORKS !!! Images appear instantly in annotate > Unassigned panel !

Bonus observation: When unannotated images are deleted from the GUI, the unannotated counter in the CLI is not reset...

Expected Behavior

When running my script images should appear in the GUI like when running line-by-line python code.

Version

1.1.37

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 by reproducing the difference between the script and line-by-line use of project.upload, then inspect the Python API upload path and the roboflow project get CLI result. No source file or test is named; done means uploads from the script appear in the GUI's annotate > Unassigned panel and the CLI unannotated count is consistent after deletion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.