XD-DENG commented on a change in pull request #4474: [AIRFLOW-3439] Decode logs with 'utf-8' URL: https://github.com/apache/airflow/pull/4474#discussion_r246807120
########## File path: airflow/utils/log/gcs_task_handler.py ########## @@ -129,7 +129,7 @@ def gcs_read(self, remote_log_location): :type remote_log_location: str (path) """ bkt, blob = self.parse_gcs_url(remote_log_location) - return self.hook.download(bkt, blob).decode() + return self.hook.download(bkt, blob).decode('utf-8') Review comment: The default encoding of `.decode()` is already "utf-8". Please refer to https://docs.python.org/3/library/stdtypes.html#bytes.decode So `.decode('utf-8')` is no difference from `.decode()`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services