Select to view content in your preferred language

error in join field "name 'self' is not defined"

182
2
03-17-2025 09:44 AM
Labels (3)
CecilaMalvezzi
New Contributor

I'm having an issue about "join feature" in geoanalytics server tool. I'm trying to build the tool in arcpy, but also playing in toolbox for testing.

 

In ArcGIS Pro, in toolbox, it's returning me that error:

Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\scripts\ga_server_joinfeatures.py", line 42, in <module>
params['context'] = set_context(arcpy.env.outputCoordinateSystem,
NameError: name 'self' is not defined

 

in jupyter, i'm coding like that:

 

arcpy.geoanalytics.JoinFeatures(
target_layer="https://#####/server/rest/services/Hosted/grid_project/FeatureServer/3",
join_layer="https://####/server/rest/services/Hosted/grid_street_intersect_sum_teste/FeatureServer/0",
output_name='"JoinFeature_grid"',
join_operation="JOIN_ONE_TO_ONE",
spatial_relationship="",
spatial_near_distance=None,
temporal_relationship="",
temporal_near_distance=None,
attribute_relationship="id_unico id_unico",
summary_fields=None,
join_condition="",
data_store="SPATIOTEMPORAL_DATA_STORE",
keep_all_target_features="KEEP_ALL",
include_distance=None,
distance_unit=""
)

 

And it also return to me "name 'self' is not defined".

 

Can someone help me with that?

 

 

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Join Features (GeoAnalytics Desktop)—ArcGIS Pro | Documentation

from the code example, "layers" are required for the inputs, and the workspace was defined.

Is that your case? or is there more code?


... sort of retired...
0 Kudos
DerekGourley
Esri Contributor

Hi CecilaMalvezzi,

Would you be able to share the version of Pro and Server that you are using?


Thanks,
Derek Gourley
GeoAnalytics Product Engineer
0 Kudos