Closed pshowalter closed 8 years ago
This is a symptom of having a single script tool in multiple toolboxes, and a good reason to re-write tools to work as methods in a single module file like we did for Range Rings.
This is also very similar to #28 here (but was a "_10.3" on the tbx name) - so you may be able to combine the issues.
Fixed in #121
In ArcGIS Pro 1.2 Military_Tools - Conversion - Convert Coordinates is failing. It seems to run OK in ArcMap after the changes below were made. By reviewing error log, found a few changes to get it to run a bit further:
In ConvertCoordinates.py code and found reference to toolbox label, rather than the name:
# Load required toolboxes
scriptpath = sys.path[0]
#toolboxpath = os.path.join(scriptpath,"..\\Military Tools.tbx")
toolboxpath = os.path.join(scriptpath,"..\\Military_Tools.tbx")
The tool proceeded to ~line 82 where a reference to toolbox alias "ma" is found and changed to "mt".
#arcpy.AddUniqueRowID_ma(Output_Table, "JoinID")
arcpy.AddUniqueRowID_mt(Output_Table, "JoinID")
` One successful run, but multiple failures:Messages Start Time: Fri Apr 29 11:50:40 2016 Executing (sourceCC): sourceCC table_to_2_point_test DD_1 POINT_YX1_TEXT # C:\ArcGISForDefense\MilitaryAnalyst\MT_PRO_12_Projects\Table_To_2_Point_Line_v2\Table_To_Point.gdb\CC_TABLE_DD_1 "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision" Start Time: Fri Apr 29 11:50:40 2016 Running script sourceCC... table_to_2_point_test C:\ArcGISForDefense\MilitaryAnalyst\MT_PRO_12_Projects\Table_To_2_Point_Line_v2\Table_To_Point.gdb\CC_TABLE_DD_1 Failed script sourceCC... <class 'SyntaxError'>SyntaxError("invalid or missing encoding declaration for 'C:\myProjects\GitHub\military-tools-geoprocessing-toolbox\toolboxes\Military_Tools.tbx'",) Failed to execute (sourceCC). Failed at Fri Apr 29 11:50:54 2016 (Elapsed Time: 13.58 seconds) Failed to execute (ConvertCoordinates). Failed at Fri Apr 29 11:50:54 2016 (Elapsed Time: 13.76 seconds)