Skip to content

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

@wknoben

Description

@wknoben
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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions