AnsweredAssumed Answered

ArcGIS API for Python Error

Question asked by gthistle_RMOW on Feb 20, 2019
Latest reply on Feb 20, 2019 by kclark_Angler

I am trying to query and download a feature layer in AGOl using the ArcGIS API for python. My code is as follows:

 

import arcgis
from arcgis.gis import GIS
gis = GIS("https://arcgis.com", "Username", "Password")
from arcgis.gis import *
import os
icy_conditions = gis.content.get('a6be839d462d4441802abad0728cc857')
icy_layers = icy_conditions.layers
icy_reports = icy_layers[0]
Status_query = icy_.query(where="Status='Cleared'")
output_file = Item.export(title=icy_reports,export_format="CSV",parameters=Status_query)

 

On the last line, I get an error saying:

 

Traceback (most recent call last):
File "<string>", line 10, in <module>
TypeError: export() missing 1 required positional argument: 'self'

 

I'm not sure where I have to call this argument. Could anyone help?

 

Thank you!

Outcomes