You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with the following although I assume this would cause major issues if there is a PermissionIssue due to something else.
except (FileNotFoundError, PermissionError) ase:
Reading through minio/minio#4434 it seems that calling head_object is not supported for prefixes.
I.e. this will only succeed if an actual object exists at the key dvc/zntrack-examples. If it’s just a prefix (i.e., a “folder”), head_object will raise an error.
This I can replicate using boto3
importboto3frombotocoreimportUNSIGNEDfrombotocore.configimportConfigfrombotocore.exceptionsimportClientError# Create an anonymous S3 clients3=boto3.client(
's3',
endpoint_url='https://minio.icp.uni-stuttgart.de',
config=Config(signature_version=UNSIGNED)
)
bucket='public'key='dvc/zntrack-examples/files/md5/f7/b8a247465f1aac988675ea086fd76a'# workskey='dvc/zntrack-examples'# returns An error occurred (403) when calling the HeadObject operation: Forbiddentry:
response=s3.head_object(Bucket=bucket, Key=key)
print(response)
exceptClientErrorase:
print(e)
I am not certain if this is only with minio handling things differently. Either way it would be great if there is an alternative or a fallback option, e.g. to list_objects_v2 instead.
The text was updated successfully, but these errors were encountered:
I am running a s3-compatible minio storage and encounter the following issue
The error comes from
s3fs/s3fs/core.py
Lines 1445 to 1452 in e960296
and can be circumvented by replacing
s3fs/s3fs/core.py
Line 1463 in e960296
with the following although I assume this would cause major issues if there is a PermissionIssue due to something else.
Reading through minio/minio#4434 it seems that calling head_object is not supported for prefixes.
I.e. this will only succeed if an actual object exists at the key
dvc/zntrack-examples
. If it’s just a prefix (i.e., a “folder”), head_object will raise an error.This I can replicate using
boto3
I am not certain if this is only with minio handling things differently. Either way it would be great if there is an alternative or a fallback option, e.g. to
list_objects_v2
instead.The text was updated successfully, but these errors were encountered: