Numéro d’ID de bogue |
BUG-000091442 |
Envoi | October 15, 2015 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS for Desktop |
Version trouvée | 10.2.2 |
Système d’exploitation | Windows OS |
Version du système d’exploitation | 7.0 64 Bit |
Statut | Known Limit
Après examen par l’équipe de développement, il a été déterminé que ce problème est lié à une limitation connue du logiciel sur laquelle Esri n’a aucun contrôle. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
Changes were made around 10.2.2 to properly isolate script tool code, validation and tool like Calculate Field and Calculate Value that use Python internally. Prior to this change, there was potential for confusing and unexpected issues that would be hard to isolate because a variable could be changed in one tool that would impact another tool.
The best strategy for passing variables into CalculateField is using string formatting as shown in the workaround.
Solution de contournement
Use the following code:arcpy.CalculateField_management(table,"gayu", "({0} + 1) / 2".format(funcg), "PYTHON", "")
Étapes pour reproduire
ID de bogue: BUG-000091442
Logiciel: