Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.89k stars 1.1k forks source link

Error when calling shaded_relief_ob = RFT(shaded_relief_rft) in shipwrecks_detection_using_bathymetric_data.ipynb #1882

Open jonmarrs opened 3 months ago

jonmarrs commented 3 months ago

Describe the bug I get the following error when I call: shaded_relief_ob = RFT(shaded_relief_rft)

Unable to find the arguments for the current raster function template. This might be because the server could not process the template or the template is invalid.(Ensure that the user account has access to Raster Utilities of the server. To share the Raster utilities to all user accounts. Please refer Sharing Raster Utilities section in https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.raster.functions.RFT.html )

To Reproduce Steps to reproduce the behavior:

import os
from pathlib import Path
from datetime import datetime as dt

from arcgis.gis import GIS
from arcgis.raster.functions import RFT  
from arcgis.learn import prepare_data, MaskRCNN

gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')

bathymetry_img = gis.content.get('442df8b8b26d41c598e4e8953e9257ca')
bathymetry_img

training_data_wrecks = gis.content.get('d9c02b5835b540e09e378c779ec3c17d')
training_data_wrecks

shaded_relief_rft = gis.content.get('b9b7c724601c4bd1946c8e2bfe4d640d')
shaded_relief_rft

shaded_relief_ob = RFT(shaded_relief_rft)

error:

Unable to find the arguments for the current raster function template. This might be because the server could not process the template or the template is invalid.(Ensure that the user account has access to Raster Utilities of the server. To share the Raster utilities to all user accounts. Please refer Sharing Raster Utilities section in https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.raster.functions.RFT.html )

Screenshots

image

Expected behavior The RFT() function should work, but it returns an error message instead due to being unable to find the arguments for the current raster function template.

Platform (please complete the following information):

Additional context Jupyter Notebook: shipwrecks_detection_using_bathymetric_data.ipynb https://github.com/Esri/arcgis-python-api/blob/master/samples/04_gis_analysts_data_scientists/shipwrecks_detection_using_bathymetric_data.ipynb

jonmarrs commented 2 months ago

One issue is that I think the data is missing from the server (https://pythonapi.playground.esri.com/portal).