Clarity between `hosted_image` and `is_hosted` in `Project.upload`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- api, backend-api-design, computer-vision
Hướng nghiên cứu
Bắt đầu tại Project.upload và roboflow/adapters/rfapi.py:90, nơi được báo cáo rằng upload_image phát sinh UploadError sau phản hồi 500. Truy vết cách hosted_image và is_hosted nội bộ được diễn giải, đồng thời so sánh các luồng xác thực và lỗi. Được xem là hoàn tất khi sự khác biệt giữa chúng và hành vi dự kiến được nêu rõ, đồng thời lệnh gọi được hiển thị không còn bỏ qua các bước kiểm tra để dẫn đến lỗi máy chủ không được giải thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I find it confusing that in Project.upload there's both a hosted_image: boolargument 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'}
- Ngôn ngữ chính
- Python
- Star
- 629
- Fork
- 140
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của roboflow/roboflow-python
-
RLE segmentation mask visible in dataset thumbnail, but invisible in annotation preview/editor Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
roboflow/roboflow-python#505 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
roboflow/roboflow-python#433 ·
-
Dataset Download Stuck Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
roboflow/roboflow-python#429 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
roboflow/roboflow-python#427 · 1 bình luận ·
-
Inability to upload raw bytes Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
roboflow/roboflow-python#426 ·
Tất cả issue của roboflow/roboflow-python
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·