Select to view content in your preferred language

GP service gives error in REST when CSV is uploaded as input

1653
5
04-08-2022 03:13 AM
SOVANHALDER
Regular Contributor

I have created a simple model in ArcMap 10.8.1 to  create Feature Class from CSV file using 'Make XY Event Layer" and  'Feature Class to Feature Class tool and I  have successfully published a GP service with this model.

But when access the GP service  from REST when I am uploading  a csv file and providing input as "itemId":"abc....." I am getting the error: "Invalid value  for parameter .. Details: Unable to parse JSON value of the parameter.'

I have tried to upload a json file but no luck.

Can anyone help on this ?

TIA

SOVANHALDER_0-1649412294108.png

SOVANHALDER_1-1649412671206.png

 

 

Tags (1)
0 Kudos
5 Replies
ABishop
MVP Alum

try removing all the parameters and run the model in the model builder to see if it runs properly.  

Amanda Bishop, GISP
0 Kudos
SOVANHALDER
Regular Contributor

The model runs fine with Parameters enabled and GP service published successfully.  The problem is when I upload a new CSV and use that as input parameter it fails from REST .

0 Kudos
José_ManuelMendoza
Emerging Contributor

Hi, I am facing the same problem, by any chance did you manage to find the error?

 

Jos_ManuelMendoza_0-1675786924407.png

 

0 Kudos
ABishop
MVP Alum

try editing the json to match the values in the original CSV

Amanda Bishop, GISP
0 Kudos
José_ManuelMendoza
Emerging Contributor

Thanks for the answer, but I found the error, I was naming differently the parameter in swagger, after using the same parameter name indicated in :

https://<analysis url>/server/rest/services/task/GPServer/task

the problem got fixed and the tool ran.

 

Best,

 

JM