Hello
I am facing differences and unexpected behaviors when running Python scripts in ArcGIS Notebook Server, whereas everything is fine in local (through my IDE or with ArcGIS Pro). Context : I have several windows scheduled tasks triggering Python scripts that I am currently migrating to Notebook. I am working with an ArcGIS Portal 10.9.1.
Exemple of unexpected behavior : a simple arcpy.Append_management
append_res = arcpy.Append_management(
inputs=gdb_fc_full_path,
target=dest_full_path,
schema_type="NO_TEST"
)
if append_res and append_res.maxSeverity > 0:
messages = append_res.getAllMessages()
for message_type, message_code, message_string in messages:
print(f"{message_type} : {message_code} - {message_string}")
The piece of code above works fine in local. But in Notebook, on a specific feature class, it triggers the following Exception :
AttributeError: 'Result' object has no attribute 'getAllMessages'
Which means that the Append_management ended without crash, but when analyzing the warnings and errors it contains, the Result object is incomplete, as I cannot call the getAllMessages method. Any hints on why such behavior ?
Another example would be calling the arcpy.ReconcileVersions_management function. In local, it works successfully, or with conflicts, depending on the version. But in Notebook, one some versions, it just crashes, or timeouts. Note that I am using in both cases a sde connection file with the same privileges.
I am looking for workarounds in both cases.
Thank you