Spatial Join - JSONDecodeError

114
0
11-23-2021 09:18 AM
CharlotteGeo
New Contributor

Trying to do a simple spatial join - screenshot with code

Accessing the data is fine, query is fine. But join throws this decode error. 

Environment: ArcGIS Online
User Role: Administrator
User Type: Creator
License: ArcGIS Pro Adv
Login Type: Azure AD

Data: Point layer and one Polygon (both are hosted feature layers)

pointsLocal_join = features.summarize_data.join_features(target_layer=point_fc,
join_layer=ft2_fc,
spatial_relationship="intersects",
join_operation="JoinOneToMany",
join_type="INNER")

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
<ipython-input-6-3a14c8112541> in <module>
      3                                                       spatial_relationship="intersects",
      4                                                       join_operation="JoinOneToMany",
----> 5                                                       join_type="INNER")

/opt/conda/lib/python3.7/site-packages/arcgis/features/summarize_data.py in join_features(target_layer, join_layer, spatial_relationship, spatial_relationship_distance, spatial_relationship_distance_units, attribute_relationship, join_operation, summary_fields, output_name, context, gis, estimate, future, join_type)
    671     if 'summary_fields' not in params:
    672         params['summary_fields'] = summary_fields
--> 673     return gis._tools.featureanalysis.join_features(**params)

/opt/conda/lib/python3.7/site-packages/arcgis/_impl/tools.py in join_features(self, target_layer, join_layer, spatial_relationship, spatial_relationship_distance, spatial_relationship_distance_units, attribute_relationship, join_operation, summary_fields, output_name, context, estimate, records_to_match, future, join_type)
   3103         params = _inspect_function_inputs(self._tbx.join_features, **params)
   3104         params['future'] = True
-> 3105         gpjob = self._tbx.join_features(**params)
   3106         gpjob._is_fa = True
   3107         if future:

<string> in join_features(target_layer, join_layer, spatial_relationship, spatial_relationship_distance, spatial_relationship_distance_units, attribute_relationship, join_operation, summary_fields, records_to_match, output_name, context, join_type, gis, future)

/opt/conda/lib/python3.7/site-packages/arcgis/geoprocessing/_support.py in _execute_gp_tool(gis, task_name, params, param_db, return_values, use_async, url, webtool, add_token, return_messages, future)
    390                 job_info = gptool._con.post(submit_url, gp_params)
    391         else:
--> 392             job_info = gptool._con.post(submit_url, gp_params)
    393         job_id = job_info['jobId']
    394         if future:

/opt/conda/lib/python3.7/site-packages/arcgis/gis/_impl/_con/_connection.py in post(self, path, params, files, **kwargs)
    718                                      file_name=file_name,
    719                                      try_json=try_json,
--> 720                                      force_bytes=kwargs.pop('force_bytes', False))
    721     #----------------------------------------------------------------------
    722     def put(self, url, params=None, files=None, **kwargs):

/opt/conda/lib/python3.7/site-packages/arcgis/gis/_impl/_con/_connection.py in _handle_response(self, resp, file_name, out_path, try_json, force_bytes)
    502                     raise Exception(data['error'])
    503             else:
--> 504                 data = resp.json()
    505             #if 'error' in data:
    506                 #raise Exception(data['error'])

 

0 Kudos
0 Replies