ISSUE with Script Tool Encryption

72
1
Jump to solution
07-08-2022 10:07 AM
JMarcel192
New Contributor II

Hi, I have some python script tools that work well when: 

  • linked (not embedded)
  • embedded

but once I encrypt the tool, if always fails with the code:000989 or <https://pro.arcgis.com/en/pro-app/2.8/tool-reference/tool-errors-and-warnings/001001-010000/tool-err...

 

I think it is a permissions issue on writing the script.

0 Kudos
1 Solution

Accepted Solutions
JMarcel192
New Contributor II

Hello World,  

 

I figured it out, in the Settings >>Options >> Geoprocess,  I had the option enabled: "Analyze Script and Model Tools for ArcGIS Pro Compatibility"  (while I had never turned it on myself, my employer does the installation, or it came enabled as default). 

The website <https://pro.arcgis.com/en/pro-app/2.8/tool-reference/tool-errors-and-warnings/001001-010000/tool-err... > doesn't indicate that this could be linked to its cause of failing the process.  

How I figured out the issue and lines of codes that might be considered "incompatible" with ArcGIS Pro is by running the tool: "Analyze Tools for Pro",  - the line of code are:

  • arcpy.AddMessage(u"\u200B")     # -> which adds a new line in the console.

While the script tool runs perfectly; linked, embedded; it failed encrypted. So encrypting the script tool initiates a check for compatibility.

 

I did spend about a week checking the python code for spaces, tabs, errors,.. etc, but it was a CR-NL coding that was failing it. Now, it (all script tools) work perfectly without changes. Maybe this line should be included as compatible since it works fine, and the ERROR 000989 website should state other reasons on this matter.

 

Thank you World!

 

View solution in original post

0 Kudos
1 Reply
JMarcel192
New Contributor II

Hello World,  

 

I figured it out, in the Settings >>Options >> Geoprocess,  I had the option enabled: "Analyze Script and Model Tools for ArcGIS Pro Compatibility"  (while I had never turned it on myself, my employer does the installation, or it came enabled as default). 

The website <https://pro.arcgis.com/en/pro-app/2.8/tool-reference/tool-errors-and-warnings/001001-010000/tool-err... > doesn't indicate that this could be linked to its cause of failing the process.  

How I figured out the issue and lines of codes that might be considered "incompatible" with ArcGIS Pro is by running the tool: "Analyze Tools for Pro",  - the line of code are:

  • arcpy.AddMessage(u"\u200B")     # -> which adds a new line in the console.

While the script tool runs perfectly; linked, embedded; it failed encrypted. So encrypting the script tool initiates a check for compatibility.

 

I did spend about a week checking the python code for spaces, tabs, errors,.. etc, but it was a CR-NL coding that was failing it. Now, it (all script tools) work perfectly without changes. Maybe this line should be included as compatible since it works fine, and the ERROR 000989 website should state other reasons on this matter.

 

Thank you World!

 

0 Kudos