Select to view content in your preferred language

to_featurelayer() fails with overwrite option

04-25-2023 08:37 AM
New Contributor III

The documentation for publishing a SEDF as a feature layer says it is possible to overwrite an existing layer with over=True and giving layer details as optional arguments.

Documentation reference:


when I try

sedf.spatial.to_featurelayer(overwrite=True, service={"featureServiceId" :  featureServiceId, "layer": 0}


I get an error:

TypeError: to_featurelayer() got an unexpected keyword argument 'overwrite'



When I published the first version of the featurelayer using sedf.spatial.to_featurelayer(title="Title") - it worked

0 Kudos
2 Replies
New Contributor II

Hello - I am having the same issue. Can someone from ESRI address this?

0 Kudos
New Contributor III

I was able to get it to work. In the Dev API reference it states they are additional parameters. 

try something like this format:

sedf.spatial.to_featurelayer(title='abc', gis=gis, tags=None, folder=None, sanitize_columns=False, service_name=None, overwrite=True,service= {“featureServiceId” : “9311d21a9a2047d19c0faaebd6f2cca6”, “layer”: 0})
0 Kudos