vapiravfif commented on a change in pull request #4571: [AIRFLOW-3419] 
S3_hook.select_key is broken on Python3
URL: https://github.com/apache/airflow/pull/4571#discussion_r249870794
 
 

 ##########
 File path: airflow/hooks/S3_hook.py
 ##########
 @@ -272,7 +272,7 @@ def select_key(self, key, bucket_name=None,
             InputSerialization=input_serialization,
             OutputSerialization=output_serialization)
 
-        return ''.join(event['Records']['Payload']
+        return ''.join(event['Records']['Payload'].decode('utf-8')
 
 Review comment:
   There are two other hard-coded "utf-8" in S3_hook file, one of them in 
"read_key" function with same decode.
   Changing it to parameter is much bigger scope that this PR

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to