cli image upload documentation / functionality
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- cli, documentation
Rechercherichtung
Beginne mit der Verarbeitung der Upload- und Importbefehle in roboflowpy.py, insbesondere mit upload_image, und untersuche workspace.py, wo Projekt-IDs aufgelöst werden. Reproduziere die dokumentierten Befehle mit einem einzelnen Bild, einem Wildcard-Ausdruck und dem Import-Fallback. Als abgeschlossen gilt die Aufgabe, wenn das CLI-Verhalten und die Dokumentation übereinstimmen, einschließlich der Projektauswahl und des Uploads mehrerer Bilder.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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:0@0.011] 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.
- Vorherrschende Sprache
- Python
- Sterne
- 629
- Forks
- 140
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 5
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus roboflow/roboflow-python
-
RLE segmentation mask visible in dataset thumbnail, but invisible in annotation preview/editor Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
roboflow/roboflow-python#505 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
roboflow/roboflow-python#433 ·
-
Dataset Download Stuck Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
roboflow/roboflow-python#429 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
roboflow/roboflow-python#426 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
roboflow/roboflow-python#422 ·
Alle Issues in roboflow/roboflow-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
bancolombia/sentinel#23 ·
-
test md OffenCI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100