terricain / aioboto3

Wrapper to use boto3 resources with the aiobotocore async backend
Apache License 2.0
732 stars 75 forks source link

Get object fails for zip file #213

Closed gauridhawan closed 3 years ago

gauridhawan commented 4 years ago

Description

I have a zip file in my s3 bucket. I tried to get the zip file from S3 using client.get_object, however it says UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 12: invalid continuation byte. The same error does not occur when I try to get the data using boto3.

What I Did

    async with aioboto3.client("s3", config=Config(signature_version='s3v4'), aws_access_key_id=AWS_ACCESS_KEY,aws_secret_access_key=AWS_SECRET_KEY) as s3_client:
        try:
            s3_ob = await s3_client.get_object(Bucket=DEFAULT_BUCKET_NAME, Key=path)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 12: invalid continuation byte
terricain commented 4 years ago

What aioboto3 aiobotocore boto3 and botocore versions you using?

gauridhawan commented 4 years ago

aioboto3==1.0.0 aiobotocore==0.3.1 boto3==1.4.5 botocore==1.5.38

terricain commented 4 years ago

aioboto3 1.0.0 is extremely old we're on 8.0.5 now, you should look at upgrading and seeing if the issue persists