Hello Esri Community,
I'm encountering a couple of challenging issues with ArcGIS Pro 3.4.3 while working on a Python script for GPS data post-processing, which includes a vertical transformation to NAVD88 using Geoid18. I'd appreciate any insights or suggestions!
Primary Issue: arcpy.AddMessage (and AddError/AddWarning) Failing Silently
This is currently my main blocker. When I run scripts (either in the ArcGIS Pro Python window or as a script tool), any calls to arcpy.AddMessage(), arcpy.AddError(), or arcpy.AddWarning() do not produce any output in the Python window console or in the geoprocessing messages.
However:
Here's a simple test script I've been using to demonstrate this:
print("--- ARC_TEST_A: Script Start (Python print) ---") try: print("--- ARC_TEST_B: Importing arcpy (Python print) ---") import arcpy print("--- ARC_TEST_C: arcpy imported (Python print) ---") # Test 1: Basic Messaging arcpy.AddMessage("--- ARC_TEST_D: arcpy.AddMessage test ---") print("--- ARC_TEST_E: After arcpy.AddMessage (Python print) ---") # Test 2: Get Install Info & Product Info install_info = arcpy.GetInstallInfo() product_name = install_info.get('ProductName', 'N/A') product_version = install_info.get('Version', 'N/A') license_level = install_info.get('LicenseLevel', 'N/A') arcpy.AddMessage(f"--- ARC_TEST_F: Product: {product_name}, Version: {product_version}, License: {license_level} (arcpy.AddMessage) ---") print(f"--- ARC_TEST_G: Product: {product_name}, Version: {product_version}, License: {license_level} (Python print) ---") # Test 3: Describe something simple temp_gdb_path_for_test = r"C:\temp\dummy.gdb" if arcpy.Exists(temp_gdb_path_for_test): desc = arcpy.Describe(temp_gdb_path_for_test) arcpy.AddMessage(f"--- ARC_TEST_H: Describe successful for {temp_gdb_path_for_test}: {desc.dataType} (arcpy.AddMessage) ---") print(f"--- ARC_TEST_I: Describe successful for {temp_gdb_path_for_test}: {desc.dataType} (Python print) ---") else: arcpy.AddMessage(f"--- ARC_TEST_H: Path {temp_gdb_path_for_test} does not exist for Describe test (arcpy.AddMessage). ---") print(f"--- ARC_TEST_I: Path {temp_gdb_path_for_test} does not exist for Describe test (Python print). ---") except Exception as e: print(f"--- ARC_TEST_ERROR (Python print): An exception occurred: {str(e)} ---") try: arcpy.AddError(f"--- ARC_TEST_ERROR (arcpy.AddError): An exception occurred: {str(e)} ---") except: print("--- ARC_TEST_ERROR (Python print): arcpy.AddError ALSO FAILED during exception handling. ---") print("--- ARC_TEST_J: Script End (Python print) ---")
When I run this, the output I get is:
--- ARC_TEST_A: Script Start (Python print) --- --- ARC_TEST_B: Importing arcpy (Python print) --- --- ARC_TEST_C: arcpy imported (Python print) --- --- ARC_TEST_E: After arcpy.AddMessage (Python print) --- --- ARC_TEST_G: Product: ArcGISPro, Version: 3.4.3, License: Standard (Python print) --- --- ARC_TEST_I: Path C:\temp\dummy.gdb does not exist for Describe test (Python print). --- --- ARC_TEST_J: Script End (Python print) ---
As you can see, messages D, F, and H (from arcpy.AddMessage) are missing. This makes debugging any geoprocessing tool failures (like the one below) very difficult as I don't get the arcpy.GetMessages() output.
Original Problem Context: ERROR 000365: Invalid geographic transformation for Geoid18
The silent messaging issue was discovered while trying to debug why the following vertical transformation fails with ERROR 000365 in Stage 3 of my main script (and also when tested manually in the Project tool):
Environment:
Troubleshooting Steps Taken:
Questions for the Community:
Any suggestions or shared experiences would be greatly appreciated!
Thanks,
Does GetAllMessages reveal the hidden one? (see the code example and explanations)
GetAllMessages—ArcGIS Pro | Documentation