Open
Description
I find it confusing that in Project.upload
there's both a hosted_image: bool
argument set by the user, and an internal is_hosted
, that determines which errors may be thrown.
By setting hosted_image
it's possible to bypass checks and send the image to Roboflow, which promptly returns a 500
code.
Still, maybe there's a reason behind it?
Test code:
import roboflow
img_path = "<path_to_img>"
rf = roboflow.Roboflow(api_key="API_KEY")
workspace_id = "<ws ID>"
project_id = "<proj ID>"
workspace = rf.workspace(workspace_id)
project = workspace.project(project_id)
project.upload(img_path, hosted_image=True)
This raises:
File ... /roboflow/adapters/rfapi.py:90, in upload_image(api_key, project_url, image_path, hosted_image, split, batch_name, tag_names, sequence_number, sequence_size, **kwargs)
UploadError: Bad response: 500: {'error': 'Unknown error'}
Metadata
Metadata
Assignees
Labels
No labels