Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getResource() downloads empty .zip for particular resource #126

Open
wknoben opened this issue Mar 25, 2021 · 3 comments
Open

getResource() downloads empty .zip for particular resource #126

wknoben opened this issue Mar 25, 2021 · 3 comments

Comments

@wknoben
Copy link

wknoben commented Mar 25, 2021

from hs_restclient import HydroShare, HydroShareAuthBasic

auth = HydroShareAuthBasic(username = 'user', password = 'password')
hs = HydroShare(auth=auth)
hs.getResource('1361509511e44adfba814f6950c6e742', destination = '/some/folder')

returns a 0KB zip file. It's not entirely clear to me what goes wrong as no error is returned. Output reads None. This seems to happen for this specific resource only, as a different resource (e.g. ddbe8fa5a5b84e23bb37beeaeaac714d) can be successfully downloaded as a zip file with this same code.

Downloading the main file in resource 1361509511e44adfba814f6950c6e742 with getResourceFile() seems to successfully complete. Sample code:

hs.getResourceFile('1361509511e44adfba814f6950c6e742', "usda_mode_soilclass_250m_ll.tif", destination = '/some/folder')
@dtarb
Copy link
Member

dtarb commented Mar 26, 2021

This may be size related. @sblack-usu any thoughts.

@sblack-usu
Copy link
Contributor

It sounds like the issue we saw a couple of months back. @cbcunc Here is another resource that downloads a 0 bytes bag, is this related to the replica issue we saw previously?

@sblack-usu
Copy link
Contributor

The 0 bytes download is not unique to the rest client, I tried downloading it from the web page and got a 0 byte download there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants