Skip to main content

Profile Tool error: Unhandled exception: 'The given key was not present in the dictionary.' in activity '1.72: Cast<Object[]>'.

Comments

2 comments

  • Permanently deleted user
    Hi Rawan,

     

    The Profile Tool workflow runs a series of web requests to the Identify endpoint for the DEM that you published that has height information.

     

    The Cast<Object[]> activity is trying to locate a specific named attribute out of the Identify response.  If that attribute isn't there, you will get the error "The given key was not present in the dictionary".

     

    To troubleshoot, I recommend using Log or Alert to print out the JSON that is returned.  Then, you can see if the key in the dictionary is a different word, or you can see if there is an error.

     

    You may also get this error if your DEM has no data where you draw the transect line.

     

    Regards,

     

    -Malcolm
    0
  • Permanently deleted user
    Hi Malcolm,

     

    Thank you for your answer, I have two sites and the two sites have the Profile tool

     

    The profile tool in the first site is working fine, but I got the error in the second site.

     

    I noticed that when include the DEM for the second site in the map service for the first site the profile tool works fine. But when I published the DEM for second site in a new map service I got the error.

     

    I use the same ArcGIS server for both map services (the same properties applied on both services), what might be the cause of this problem?

     

     
    0

Please sign in to leave a comment.