laptop and a wrench

Bogue

"NameError: name 'self' is not defined" error is displayed when using the Join Features (GeoAnalytics Server tool) in ArcGIS Pro 3.2.x with ArcGIS Enterprise 11.1.

ArcGIS Pro
Numéro d’ID de bogue BUG-000167322
EnvoiMay 8, 2024
Dernière modificationMarch 27, 2025
S’applique àArcGIS Pro
Version trouvée3.2.2
Système d’exploitationWindows OS
Version du système d’exploitationN/A
Version de correction3.4
StatutFixed

Solution de contournement

  • When navigating to C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\ga_server_joinfeatures.py and open the tool script, an error is displayed due to the inability to reference self in the main function. However, in the other functions, it can be referenced since it is sent as a function parameter.
  • Comment the lines 51 to 54:

# includeDistance and distanceUnit were exposed at 11.2:

 #if PortalVersion() < 2023.2: # 11.2

  #self.params[14].enabled = False

  #self.params[15].enabled = False

  • Copy the lines 52 to 54 and paste them inside the updateParameters function:

def updateParameters(self):

 """Modify the values and properties of parameters before internal

   validation is performed. This method is called whenever a parameter

  has been changed."""

if PortalVersion() < 2023.2: # 11.2

  self.params[14].enabled = False

  self.params[15].enabled = False

  • Run the Join Features (GeoAnalytics Server tool) once again.

Étapes pour reproduire

ID de bogue: BUG-000167322

Logiciel:

  • ArcGIS Pro

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement