How to access the download output?

1443
3
Jump to solution
05-11-2020 12:06 PM
IandeNeeve1
New Contributor III

Needing to download a csv item from AGOL. I have called the item.download function, and it appears to work, placing the zip folder at 

'/tmp/Runway21.zip'.

Where is this and how do i access it?

Here is the present code:

0 Kudos
1 Solution

Accepted Solutions
VictorTey
Esri Contributor

Hi Ian deNeeve‌, Ian deNeeve

you can try doing 

import tempfile

print tempfile.gettempdir()

 

ALTERNATIVELY if you are unsure why not specify the save_path

Then you will know exactly where it is. 

download(save_path=None, file_name=None)https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.download

Downloads the data to the specified folder or a temporary folder if a folder is not provided.

Argument

Description

save_path

Optional string. Folder location to download the file to.

file_name

Optional string. The name of the file.

View solution in original post

0 Kudos
3 Replies
VictorTey
Esri Contributor

Hi Ian deNeeve‌, Ian deNeeve

you can try doing 

import tempfile

print tempfile.gettempdir()

 

ALTERNATIVELY if you are unsure why not specify the save_path

Then you will know exactly where it is. 

download(save_path=None, file_name=None)https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.download

Downloads the data to the specified folder or a temporary folder if a folder is not provided.

Argument

Description

save_path

Optional string. Folder location to download the file to.

file_name

Optional string. The name of the file.

0 Kudos
IandeNeeve1
New Contributor III

Yes. Figured out how to specify a path. I was trying various approaches and having no luck. Once i took it from the Online Notebooks environment to specifically Jupyter, as launched from my machine, I was able to specify a path and it works.

Thanks, Victor.

0 Kudos
CaseyFrost
New Contributor II

Ever figure out how to run it online in a jupyter notebook? I'm having the exact same issue.

0 Kudos