ai-cfia / ai-cfia/ailab-datastore
Blob not found
- 主要言語
- Python
- スター
- 3
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm getting a bob not found error
[
"Datastore Error retrieving the picture : The specified blob does not exist.\nRequestId:628986d5-601e-0060-7c8d-fdb62e000000\nTime:2024-09-02T23:10:16.3300199Z\nErrorCode:BlobNotFound\nContent: BlobNotFoundThe specified blob does not exist.\nRequestId:628986d5-601e-0060-7c8d-fdb62e000000\nTime:2024-09-02T23:10:16.3300199Z\nError getting blob:6835a15d-655a-478d-a9d4-c6bdb9230621/9b186422-0650-4b1a-87ed-521c57cedad8.png"
]
using these parameters
{
"user_id": "a427278e-28df-428f-8937-ddeeef44e72f",
"container_name": "6835a15d-655a-478d-a9d4-c6bdb9230621",
"picture_id": "9b186422-0650-4b1a-87ed-521c57cedad8"
}
I'm guessing from this line 446 in app.py of nachet backend
blob = await datastore.get_picture_blob(cursor, str(user_id), container_client, str(picture_id))
```python
@app.post("/get-picture")
async def get_picture():
"""
get all directories in the user's container with pictures names and number of pictures
"""
try:
data = await request.get_json()
container_name = data.get("container_name")
user_id = data.get("user_id")
picture_id = data.get("picture_id")
if user_id and picture_id:
container_client = await azure_storage.mount_container(
CONNECTION_STRING, container_name, create_container=True
)
# Open db connection
connection = datastore.get_connection()
cursor = datastore.get_cursor(connection)
picture = {}
picture["picture_id"] = picture_id
inference = await datastore.get_inference(cursor, str(user_id), str(picture_id))
picture["inference"] = inference
blob = await datastore.get_picture_blob(cursor, str(user_id), container_client, str(picture_id))
image_base64 = base64.b64encode(blob)
picture["image"] = "data:image/tiff;base64," + image_base64.decode("utf-8")
# Close connection
datastore.end_query(connection, cursor)
return jsonify(picture)
else:
raise MissingArgumentsError("Missing container name")
except datastore.DatastoreError as error:
print(error)
return jsonify([f"Datastore Error retrieving the picture : {str(error)}"]), 400
except (KeyError, TypeError, APIError) as error:
print(error)
return jsonify([f"API Error retrieving the picture : {str(error)}"]), 400
except Exception as error :
print(error)
return jsonify(["Unhandled API error : Error retrieving the picture"]), 400
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。