Closed dimaqq closed 5 years ago
Hi, @dimaqq
Can you try to use it with try-except :
def client():
return aiobotocore.get_session().create_client(
"s3",
endpoint_url=f"http://{os.environ.get('STORAGE_HOST', '???')}:9000",
aws_access_key_id=os.environ.get("STORAGE_ACCESS_KEY", "???"),
aws_secret_access_key=os.environ.get("STORAGE_SECRET_KEY", "???"),
)
async def some_endpoint():
some_bucket = "images" # bucket must exist, else we hang...
key = secrets.token_hex(8)
async with client() as c:
try:
await c.put_object(Bucket=some_bucket, Key=key, Body=upload.read())
except Exception as e:
print(e)
Hi, sorry, I moved on to another project and will not be able to test this. I'm pretty sure no exception was raised as that would generate an HTTP 400 response.
please state what botocore version you had, this is critically important
also can you provide full test-case? I can implement something but won't necessarily be what your issue is. Given you say this is happening in docker please provide dockerfile.
going to close as @dimaqq is unable to re-test and unable to exclude minio as culprit nor uvloop. Feel free to re-open if you have more information.
Environment:
Differential diagnosis:
Apologies that I'm not yet able to test against real S3 and cannot exclude minio as culprit.
Code snippet: