Invalid JSON Data

1928
4
Jump to solution
06-28-2021 08:05 AM
Labels (2)
HamzaM
by
New Contributor III

I am following this course https://www.esri.com/training/Engine/defaultui/player/modern.html?configuration=ReturnUrl%7C&prevent... on esri academy in the Data Engineering section at the last part time stamped 12:46  which is to convert the data to a spatial feature class to be able to visualize it on the map on arcgis pro i get this error.

Invalid JSON Data.PNG

@JayantaPoddar @DanPatterson @DavidPike @jcarlson @DanLee @JoshuaBixby @Scott_Harris @TomBole 

0 Kudos
1 Solution

Accepted Solutions
AlbertoNieto1
Esri Contributor

Thank you. We are investigating a change to the ArcGIS API for Python's to_featureclass function that might have resulted in an issue with this workflow. 

The problem is that null rows in the spatially-enabled dataframe are not being processed. An intermediate workaround is to drop rows with null values:

out_2016_fc = data_2016_df.dropna().spatial.to_featureclass(os.path.join(fgdb, out_2016_fc_name))

 

View solution in original post

0 Kudos
4 Replies
AlbertoNieto1
Esri Contributor

Hi HamzaM,

Sorry to hear about the problem. I was able to reproduce the error on my side, and we are working on a solution to the problem. 

To help us confirm some details, could you please let me know:

- What version of ArcGIS Pro are you using?

- What version of the ArcGIS API for Python do you have installed in ArcGIS Pro?

(to check, select the "Project" menu at the top-left corner of ArcGIS Pro...

AlbertoNieto1_0-1624898894709.png

... then check the Python option, select Installed Packages, then select arcgis:

 

AlbertoNieto1_3-1624898961089.png

 

- Did you install the ArcGIS API for Python separately from ArcGIS Pro? 

HamzaM
by
New Contributor III

Hello Alberto,

- What version of ArcGIS Pro are you using?

2.8.1

- What version of the ArcGIS API for Python do you have installed in ArcGIS Pro?

1.8.5

 Did you install the ArcGIS API for Python separately from ArcGIS Pro? 

I created a clone environment the installed it using python cmd with this code:

 conda install -c esri arcgis

0 Kudos
AlbertoNieto1
Esri Contributor

Thank you. We are investigating a change to the ArcGIS API for Python's to_featureclass function that might have resulted in an issue with this workflow. 

The problem is that null rows in the spatially-enabled dataframe are not being processed. An intermediate workaround is to drop rows with null values:

out_2016_fc = data_2016_df.dropna().spatial.to_featureclass(os.path.join(fgdb, out_2016_fc_name))

 

0 Kudos
feralcatcolonist_old
Occasional Contributor II

Hey @AlbertoNieto1, is there an update on a fix for this? My current work-around is to supply dummy values where a [SHAPE] is null. 


Likes an array of [cats, gardening, photography]
0 Kudos