grab icon indicating copy to clipboard operation
grab copied to clipboard

open file failure, got err bad content length

Open ghost opened this issue 5 years ago • 5 comments

Hi guys,

Hope you are all well !

I have often the following error when downloading with grab:

open file failure, got err bad content length

Any way to sort it out ?

Cheers, X

ghost avatar Mar 08 '20 08:03 ghost

I'm also getting it when downloading some files that we already previously downloaded successfully (by Grab itself) and thus already exist.

This always fails if the tar.gz archive already exists:

grab.Get(path, "https://github.com/nginx/nginx/archive/release-1.18.0.tar.gz")

This always works even if the iso already exists:

grab.Get(path, "https://releases.ubuntu.com/20.04.1/ubuntu-20.04.1-live-server-amd64.iso")

m-barthelemy avatar Jan 07 '21 12:01 m-barthelemy

@cavaliercoder do you have any idea about what is going wrong with downloads from Github archives?

m-barthelemy avatar Jan 12 '21 00:01 m-barthelemy

same issues

youngjuning avatar Feb 05 '21 02:02 youngjuning

@cavaliercoder ,

Hope you are all well !

Screenshot 2021-02-21 at 11 45 15

I am still facing the issue, any idea of a workaround for fixing that annoying issue ?

Thanks for any insights or inputs on that.

Cheers, Luc Michalski

ghost avatar Feb 21 '21 10:02 ghost

As mentioned in https://github.com/cavaliergopher/grab/issues/71#issuecomment-756088099 this happens when the file to be downloaded already exists in the destination, for now I just remove the existing file

anjannath avatar Aug 19 '22 06:08 anjannath