1

I am trying to convert a JSON file into a feature. My code was working fine until today and now I am getting the following error - ExecuteError: ERROR 001558: Error parsing json file '<filepath>'. The workspace is not connected..

I tried it manually in ArcMap using this proceedure:

  • I first checked that the JSON file looked correct (had all the prerequisites like geometryType, Features, etc...).
  • In arcMap (10.5), I went to toolbox > Conversion Tools > JSON > JSON To Features.
  • I input the filepath to the .json file and then made sure the output went to a .gdb.
  • I double checked the filepaths.

Same results: ERROR 001558. I even tried the default output, which went to the ArcGIS\Default.gdb. I also got the same error:

ExecuteError: ERROR 001558: Error parsing json file ''. The workspace is not connected. Failed to execute (JSONToFeatures).

In researching this issue, I found the ArcGIS Pro page on 001558: Error parsing .json file <value> which states that the The JSON must have at least the geometryType, spatialReference, fields, and features (with geometry and attributes) property. I checked the data and it has geometryType, spatialReference, fields, and features which have attributes and geometry.

{"displayFieldName": "CSLF_ID",
"fieldAliases": {...},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
  "wkid": 102100,
  "latestWkid": 3857
},
"fields": [...],
"features": [
  {"attributes": {...},
   "geometry": {...}
  },...]}

So, I am wondering if there might be something else causing the error. Or can anyone see an issue with the JSON file above?

9
  • 1
    What are the detailed steps that you are using when you are "trying it manually in arcMap"?
    – PolyGeo
    Commented Oct 17, 2018 at 22:14
  • I first checked that the JSON file looked correct (had all the prerequisites like geometryType, Features, etc...). In arcMap (10.5), I went to toolbox > Conversion Tools > JSON > JSON To Features. I input the filepath to the .json file and then made sure the output went to a .gdb. I double checked the filepaths. Same results: ERROR 001558. I even tried the default output, which went to the ArcGIS\Default.gdb.
    – gwydion93
    Commented Oct 17, 2018 at 22:39
  • 1
    Please use the edit button beneath your question to revise it with any requested clarifications. Not all potential answerers will read all comments. It is your question that they are most likely to focus their volunteered time on.
    – PolyGeo
    Commented Oct 17, 2018 at 22:47
  • Added the manual steps I took to the question.
    – gwydion93
    Commented Oct 17, 2018 at 22:57
  • 1
    can you copy/paste the json into jsonlint.com and confirm its valid?
    – KHibma
    Commented Oct 18, 2018 at 15:20

1 Answer 1

1

I know it's a bit late, but I had the same problem.

How the problem raised:

I was downloading my data as GeoJSON for different areas with multiple requests. To import all the data at once in ArcGIS Pro my downloader-script combined all entries under "features". Some features were downloaded by multiple requests so by adding all into one array caused some features to have been added twice.

The solution:

Make sure that all features you have in that array have unique OBJECTIDs (feature→attributes→OBJECTID).

In my case I checked for every feature if one with the same OBJECTID already exists in the final GeoJSON before adding it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.