danneaves-ee commented on issue #20901: URL: https://github.com/apache/airflow/issues/20901#issuecomment-1015218971
Thanks for reopening @potiuk :smile: GCS provides a "Content-Encoding" meta key, however, it's optional so I guess not many people would use it. Since XComs must be serializable, we have replaced the lines as follows in our work-around; ``` # airflow.providers.google.cloud.transfers.gcs_to_local.GCSToLocalFilesystemOperator ~142 - context['ti'].xcom_push(key=self.store_to_xcom_key, value=str(file_bytes)) + context['ti'].xcom_push(key=self.store_to_xcom_key, value=str(file_bytes, encoding='utf-8')) ``` But it could be safer to use `sys.getdefaultencoding()` instead of `utf-8`. Or even expose the encoding as a parameter to the class? What do you think @potiuk? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
