Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Roboflow API fails silently when invalid annotations file is uploaded.

Aperta
#235 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Inizia con la riproduzione Python fornita e traccia la chiamata a project.upload usando annotation_path="annotation.json". Verifica come viene gestito e segnalato un payload di annotazione non valido; il lavoro è completato quando il file malformato non risulta più essere stato caricato correttamente e viene segnalato un errore, mentre il comportamento riportato per un caricamento valido rimane invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Likely something to be passed to the back-end team.

When debugging the annotations format, it would be useful to know when an incorrect file was uploaded. Even if it did not tell what exactly was wrong. As it stands, it now fails silently, as if annotation were applied.

Test

import json
import roboflow

rf = roboflow.Roboflow(api_key="API_KEY")
img_path = "<path_to_img>"

workspace_id = "<ws ID>"
project_id = "<proj ID>"
workspace = rf.workspace(workspace_id)
project = workspace.project(project_id)

annotation = {
    "it is": [
        {
            "very frustrating": 0,
            "when you": "send",
            "an annotation": {
                "file and": 0.5,
                
                "function": 0.5,
                "call": 0.5,
                "completes": 0.5,
                "successfully,": 0.5,

            },
            "but": "there's",
            "no": "annotations",
            "on": "the website",
            "nor": "any",
            "errors": "raised",
        }
    ]
}
with open("annotation.json", "w") as f:
    json.dump(annotation, f)

image = project.upload(img_path, annotation_path="annotation.json")

This passes.

Lingua principale
Python
Stelle
629
Fork
140
Merge medio
2g 2h
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di roboflow/roboflow-python

Tutte le issue di roboflow/roboflow-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.