You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
In the official documentation, detect_object said to be able to use existing Feature Service for the output_name variable.
output_name
Optional. If not provided, a FeatureLayer is created by the method and used as the output . You can pass in an existing Feature Service Item from your GIS to use that instead. Alternatively, you can pass in the name of the output Feature Service that should be created by this method to be used as the output for the tool. A RuntimeError is raised if a service by that name already exists
However, I got an error (provided below) whenever I tried to use a feature service item as the parameter.
To Reproduce
Steps to reproduce the behavior:
fromarcgisimportGISfromarcgis.learnimportModel, detect_objectsgis=GIS(
url='url', # i filled this with the correct credential of courseusername='username',
password='username',
)
detect_objects_model_package=gis.content.get('some_id')
raster=gis.content.get('some_other_id')
detect_objects_model=Model(detect_objects_model_package)
detect_objects_model.install(gis=gis)
test_notebook=gis.content.get('another_id') # this is the target feature servicecontext= {
'cellSize': 0.1,
'processorType':'GPU'
}
out_objects=detect_objects(
input_raster=raster,
model=detect_objects_model,
output_name=test_notebook,
context=context,
gis=gis
)
Expected behavior
I expect it to either overwrite or append the inferencing result to the existing feature service.
I tried to leave the output_name empty and also filled it with string, it works normally.
Platform (please complete the following information):
OS: Windows 11 Pro
ArcGIS Pro: 3.3 (I run my script from jupyter notebook inside ArcGIS Pro)
Python API Version: 2.3.0
Additional context
My goal is to append the inferencing result to an existing feature service
Given the error, is it correct for me to assume that currently the variable only accepts string as input?
If it is, is it possible to append the inferencing result (assume that I have the item id for the existing feature service I want to append) to the existing feature service using detect_objects only? (I have the work around with .edit_features(), but to me the documentation implies it can use an existing feature service as the output, so I'm curious)
If it is not (i.e. it can actually use another kind of input), what kind of input do I need to put to make it append the result to an existing feature service
Thanks!
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
In the official documentation,
detect_object
said to be able to use existing Feature Service for theoutput_name
variable.output_name
Optional. If not provided, a FeatureLayer is created by the method and used as the output . You can pass in an existing Feature Service Item from your GIS to use that instead. Alternatively, you can pass in the name of the output Feature Service that should be created by this method to be used as the output for the tool. A RuntimeError is raised if a service by that name already exists
However, I got an error (provided below) whenever I tried to use a feature service item as the parameter.
To Reproduce
Steps to reproduce the behavior:
error:
Expected behavior
I expect it to either overwrite or append the inferencing result to the existing feature service.
I tried to leave the
output_name
empty and also filled it with string, it works normally.Platform (please complete the following information):
2.3.0
Additional context
My goal is to append the inferencing result to an existing feature service
Given the error, is it correct for me to assume that currently the variable only accepts string as input?
Thanks!
The text was updated successfully, but these errors were encountered: