У меня возникла ошибка после запуска моей лазурной функции, которая используется для чтения лазурного хранилища больших двоичных объектов.
Ошибка
ID 0dad768d-36d4-4c1a-85ae-2a5122533b3c
fail: Function.processor.User[0]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/azure/storage/blob/_download.py", line 360, in _initial_request
location_mode, response = self._clients.blob.download(
File "/usr/local/lib/python3.8/site-packages/azure/storage/blob/_generated/operations/_blob_operations.py", line 186, in download
map_error(status_code=response.status_code, response=response, error_map=error_map)
File "/usr/local/lib/python3.8/site-packages/azure/core/exceptions.py", line 102, in map_error
raise error
azure.core.exceptions.ResourceNotFoundError: Operation returned an invalid status 'The specified blob does not exist.'
Мой код Python для доступа к файлу
from azure.storage.filedatalake import DataLakeFileClient
def get_file(self, file_path: str) -> Union[str, bytes, bytearray]:
"""Retrieve the file content of a file stored in the Data Lake
Args:
file_path (str): The path to the file
Returns:
Union[str, bytes, bytearray]: File content
Raises:
Exception: Description
"""
try:
file = DataLakeFileClient(
account_url=self.account_url,
credential=self.account_key,
file_system_name=self.fs_name,
file_path=file_path)
return bytes(file.download_file().readall())
except ResourceNotFoundError as e:
raise Exception("No such file")
Кто-нибудь знает, что это за решение
BLOB