question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to use gzip flag in S3Hook

See original GitHub issue

Apache Airflow version: v1.10.12

What happened: when using gzip param, it is looking for name in filename string

Error : AttributeError: 'str' object has no attribute 'name'

Anything else we need to know:

Its should be an easy fix in S3Hook at - https://github.com/apache/airflow/blob/827a717fecc675b4d58fa202be003dee8e423632/airflow/hooks/S3_hook.py#L364

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
XD-DENGcommented, Sep 6, 2020

Cool, thanks @eladkal for sharing this.

@yvadalia , please refer to the link @eladkal shared + https://github.com/apache/airflow#backport-packages for using the backport, before the fix is included in 1.10.13.

1reaction
XD-DENGcommented, Sep 4, 2020

Thanks for sharing the issue.

This feature was added in #7680, and the author had realised this bug later and had fixed it in #8571. But the fix was missed in the cherry-picking during the release.

CC @kaxil @ashb , let’s include #8571 in the next release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

airflow.providers.amazon.aws.hooks.s3
S3Hook. Interact with AWS S3, using the boto3 library. ... replace (bool) – A flag to decide whether or not to overwrite the...
Read more >
airflow/s3.py at main · apache/airflow - GitHub
under the License. """Interact with AWS S3, using the boto3 library.""" from __future__ import annotations. import fnmatch. import gzip as gz. import io....
Read more >
How to fix gunzip error "has flags 0xd4 -- not supported"
It is possible that the file was corrupted, or that it is not a gzip file in the first place. Share.
Read more >
Xcom 2 dev console commands - maunenily1974's Ownd
Not able to use gzip flag in S3Hook We are not affiliated with GitHub, Inc. xcom import MAX_XCOM_SIZE, XCOM_RETURN_KEY from airflow.
Read more >
gzip — Support for gzip files — Python 3.11.1 documentation
Note that additional file formats which can be decompressed by the gzip and gunzip programs, such as those produced by compress and pack,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found