AnsweredAssumed Answered

Analyze Tools for Pro - Python Scripts - Faulty Results

Question asked by mvolz47 on Aug 16, 2018
Latest reply on Aug 16, 2018 by jborgion

The below link is from ArcGIS Pro Help for migrating ArcMap based python scripts to Pro based python scripts as they run in different versions of python.


There is a section on fixing print statements where parentheses were not required in ArcMap (python 2.x), but parentheses are required in Pro (python 3.x).


Near the top of the help page is a link for "Analyze Tools for Pro" that is in blue.  This link shows a python script that can be run in Pro called AnalyzeToolsForPro_management that will show you changes that need to be made to the script.


Below is a sample line from the txt file run on a python script.


Line 57:         print("This is the feature class " + fc) ->         print(("This is the feature class " + fc))


This print statement should be OK in either python 2.x or python 3.x, but the tool suggested adding an additional parentheses around the print statement.


As such, it seems like this tool is providing extraneous tips for upgrading python scripts that are misleading.