ArcGIS Pro 3.5 (or 3.6) introduced an additional security question about third party Python code:
Opening a Python toolbox runs third-party code. Confirm you trust the source before proceeding.
Allow this toolbox code to run?
So when you click no, I could not find an option in Pro to change it back to yes.
It took me a while to figure out how to reset it. Turns out this setting is save in this location:
C:\Users\DemoUser\AppData\Local\ESRI\ArcGISPro\Geoprocessing\.access_pyt
When I delete this file, you get the popup again. You can also edit the file and change the first number from 0 to 1 to enable the toolbox.
Maybe Esri can provide some more documentation on this? Right now it's really hard to fix this issue. Hope this helps others to find this solution .
Solved! Go to Solution.
At ArcGIS Pro 3.5, this was listed as BUG-000177649 - A warning prompt is returned while adding a python toolbox(.pyt) stating, "Opening a Python toolbox runs third-party code. Confirm you trust the source before proceeding."
At ArcGIS Pro 3.6, the defect was resolved so refreshing a Python toolbox no longer causes the security warning to be seen again. (ENH-000177649 - closed)
At ArcGIS Pro 3.7 (coming soon), there is now a checkbox to the Python toolbox security warning box to never raise the warning again for that particular Python toolbox.
Hi @JoëlHempenius3, thank you for sharing. No need to manually delete any files, you can just context-click the toolbox and choose the "Refresh Python Toolbox Access Permissions" option.
You can also control this for all .pyt if you'd like (please use best judgement):
Geoprocessing settings—ArcGIS Pro | Documentation
@HannesZiegler
Thanks for the answer. In my case, it's a little different, because I get this popup when I open the Python toolbox with the Pro SDK and it's my own .pyt file packaged with the Add-in. When people navigate to the tools in Geoprocessing it works fine. However, I use the Pro SDK to do some pre-checks before invoking the pyt so I'd rather not have my users go to the Geoprocessing tools.
And with the pro SDK packaging, the pyt file isn't there in the project, so there is no option to click refresh
At ArcGIS Pro 3.5, this was listed as BUG-000177649 - A warning prompt is returned while adding a python toolbox(.pyt) stating, "Opening a Python toolbox runs third-party code. Confirm you trust the source before proceeding."
At ArcGIS Pro 3.6, the defect was resolved so refreshing a Python toolbox no longer causes the security warning to be seen again. (ENH-000177649 - closed)
At ArcGIS Pro 3.7 (coming soon), there is now a checkbox to the Python toolbox security warning box to never raise the warning again for that particular Python toolbox.
Thanks @Robert_LeClair, I'll run some tests with pro 3.6 as well to see if this Enhancement also applies to .pyt toolboxes that are packaged with an Addin