cannot get download_cloud_files to work
Hello, I am trying to DL two files from the cloud from this sciencebase page (National Hydrologic Model v1.0 water budget components aggregated to 10 and 12-digit Hydrologic Unit Code boundaries - ScienceBase-Cataloghttps://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sciencebase.gov%2Fcatalog%2Fitem%2F6283a083d34e3bef0c9a43a8&data=05%7C02%7Cgs_gitlab_servicedesk%40usgs.gov%7C7bd9bd1ebc4a4c8acb5108dc45233821%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C638461264767553522%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=TP62Mg6Vv8GsZi63F1hBxhN8fDB8FYWWgfOvLHyAKVE%3D&reserved=0). I can get the csv file I need to DL w/ download_file, but download_cloud_files downloads a csv but not the csv of the data. I get like a 5kg file of code. I attached a screen shot of the file and my code. thanks for your help. Katie [cid:a90c249d-24a8-45e3-bbd5-299eb63a5b26] import sciencebasepy
Establish a session.
sb = sciencebasepy.SbSession() sbjson = sb.get_json('https://doi.org/10.5066/P9TYOJKN')
print(sbjson)
sbchilds= pd.DataFrame(sb.get_item_file_info(sbjson))
print(sbchilds)
destination = r'C:\Users\merriman\Documents\PUMP_eval\gitlab\1_input_files\'
sburl = sbchilds[(sbchilds['name'] == "wy_huc12_budgets.csv")]['url'].item() sburlm = sbchilds[(sbchilds['name'] == "monthly_huc12_budgets.csv")]['url'].item() huc12wbcfile = sb.download_cloud_files( ["wy_huc12_budgets.csv", "monthly_huc12_budgets.csv"], [sburl,sburlm], destination)
sburl2 = sbchilds[(sbchilds['name'] == "huc12area_weights.csv")]['url'].item() huc12awfile = sb.download_file(sburl2, "huc12area_weights_" + today + ".csv", destination)
Logout
sb.logout()