cli image upload documentation / functionality
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
- Domain
- cli, documentation
Research direction
Start with the upload and import command handling in roboflowpy.py, especially upload_image, and inspect workspace.py where project IDs are resolved. Reproduce the documented commands with a single image, a wildcard, and the import fallback. Done means the CLI behavior and documentation agree, including project selection and multi-image uploads.
Written by the indexing model from the issue text.
Description
roboflow --version
1.2.11
following https://docs.roboflow.com/developer/manage-images/upload-an-image
roboflow upload val_000000.jpg
loading Roboflow workspace...
loading Roboflow project...
Traceback (most recent call last):
File "/home/matej/.local/bin/roboflow", line 10, in <module>
sys.exit(main())
~~~~^^
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/roboflowpy.py", line 612, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/roboflowpy.py", line 74, in upload_image
project = workspace.project(args.project)
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/core/workspace.py", line 91, in project
if "/" in project_id:
^^^^^^^^^^^^^^^^^
TypeError
: argument of type 'NoneType' is not iterable
it seems that project id is required...
roboflow upload --help
usage: roboflow upload [-h] [-w WORKSPACE] [-p PROJECT] [-a ANNOTATION] [-m LABELMAP] [-s SPLIT] [-r NUM_RETRIES] [-b BATCH] [-t TAG_NAMES] [-i] imagefile
positional arguments:
imagefile path to image file
options:
-h, --help show this help message and exit
-w WORKSPACE specify a workspace url or id (will use default workspace if not specified)
-p PROJECT project_id to upload the image into
get the project id:
roboflow project list
loading Roboflow workspace...
horserider10k
link: https://app.roboflow.com/matej-smid/horserider10k-aubbj
id: matej-smid/horserider10k-aubbj
type: object-detection
versions: 0
images: 0
classes: dict_keys([])
roboflow upload -p matej-smid/horserider10k-aubbj val_000000.jpg
loading Roboflow workspace...
loading Roboflow project...
Traceback (most recent call last):
File "/home/matej/.local/bin/roboflow", line 10, in <module>
sys.exit(main())
~~~~^^
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/roboflowpy.py", line 612, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/roboflowpy.py", line 74, in upload_image
project = workspace.project(args.project)
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/roboflow/core/workspace.py", line 92, in project
raise RuntimeError(f"The {project_id} project is not available in this ({self.url}) workspace")
RuntimeError: The matej-smid/horserider10k-aubbj project is not available in this (matej-smid) workspace
checking the sources for a while... the prefix before / shouldn't be there...
roboflow upload -p horserider10k-aubbj val_000001.jpg
loading Roboflow workspace...
loading Roboflow project...
nice this works, according to docs I should be able to do
roboflow upload *.jpg
not really
roboflow upload -p horserider10k-aubbj *.jpg
usage: roboflow [-h] [-v] {login,download,train,upload,import,infer,project,workspace,upload_model,get_workspace_info,run_video_inference_api,deployment,whoami} ...
roboflow: error: unrecognized arguments: val_000001.jpg val_000002.jpg val_000003.jpg val_000004.jpg ...
passing the wildcard to the cli directly doesn't work either:
roboflow upload -p horserider10k-aubbj '*.jpg'
loading Roboflow workspace...
loading Roboflow project...
[ WARN:[email protected]] global loadsave.cpp:241 findDecoder imread_('*.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
...
File "/home/matej/.local/share/uv/tools/roboflow/lib/python3.13/site-packages/PIL/Image.py", line 3493, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '*.jpg'
after some more tinkering...
roboflow import -p horserider10k-aubbj -r 5 .
did the job.
- Dominant language
- Python
- Stars
- 642
- Forks
- 146
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 13
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from roboflow/roboflow-python
-
`--json` output is not valid JSON for `search --export`, `image upload <dir>`, `model upload` and `version download`Possibly taken @cdeil claimed this 37 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
roboflow/roboflow-python#546 ·
Maintainers usually reply within 1 day
-
Failed uploads are reported as success: Version.deploy() / Workspace.deploy_model() don't raise, and roboflow model upload / roboflow image upload <dir> exit 0May be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
roboflow/roboflow-python#545 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
roboflow/roboflow-python#505 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
roboflow/roboflow-python#433 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
roboflow/roboflow-python#429 ·
Maintainers usually reply within 1 day
All issues in roboflow/roboflow-python
Similar issues
-
Unknown stop ID in slow zone data crashes post formatting and skips the rest of that day's postsOpenbackend bug tm-new-volunteer
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
transitmatters/mbta-slow-zone-bot#81 · 1 comment ·
-
area:schema documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
risk:high type:ci
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
spacetelescope/rdmt-spire#49 ·
Maintainers usually reply within 1 day