Closed BobBooth closed 6 years ago
Addressed in PR #655
Added a check to see if input feature class contains any features.
Shouldn't affect any of the automated tests, remove labels
@adgiles - I just grabbed the ClearingOperationsTools.pyt from the solutions-geoprocessing-toolbox repo and tested this: still seeing: Start Time: Thursday, February 1, 2018 11:33:07 AM Running script CreateGRGFromPoint... App environment: ARCGIS_PRO ImagePYTHON ERRORS:Traceback info: File "C:\Users\XYZ\Documents\ArcGIS\Projects\TestClrops\scripts\GRGUtilities.py", line 697, in GRGFromPoint rightCorner = float(pointExtents[0]) + ((float(cellWidth) * float(numberCellsVert)) /2.0)Error Info:could not convert string to float: 'None' ImageArcPy ERRORS:Start Time: Thursday, February 1, 2018 11:32:53 AMSucceeded at Thursday, February 1, 2018 11:32:53 AM (Elapsed Time: 0.01 seconds) Completed script Create GRG from Point... ImageFailed to execute (CreateGRGFromPoint). Failed at Thursday, February 1, 2018 11:33:07 AM (Elapsed Time: 0.34 seconds)
@bbooth Are you sure you have got the lastest, as the line:
rightCorner = float(pointExtents[0]) + ((float(cellWidth) * float(numberCellsVert)) /2.0)
is now on 718 not 697
@adgiles - yes
@bbooth when you say you grabbed ClearingOperationsTools.pyt did you also grab the rest of the files?
@adgiles - yes
@BobBooth Pro must be caching something as the tool should look like this:
And this would be the error
Huh, that is odd. @adgiles I added the toolbox to a blank project. Maybe the presence of the pycache file?
@adgiles - I think that was it. I deleted the pycache folder, re-added the tool to a new Pro project, and I see the new UI: Guess the pycache folders should not live in the solutions gp repo...
Using the new tool, I confirm that this is fixed.
Using the Create GRG from Point tool included in the Clearing Operations template, I saw an issue with Pro 2.1 where the tool seemed to be failing due to a bug. Turns out that it was user error, I had somehow not dropped a point for the start point. Input Start Location is a required field,
but the tool will run without an actual point having been dropped. The error message is: Messages Start Time: Thursday, January 11, 2018 11:38:25 AM Running script CreateGRGFromPoint... App environment: ARCGIS_PRO PYTHON ERRORS: Traceback info: File "C:\Users\XYZ\Documents\ArcGIS\Projects\Pro_2_1_CLROPS_Test\scripts\GRGUtilities.py", line 697, in GRGFromPoint rightCorner = float(pointExtents[0]) + ((float(cellWidth) * float(numberCellsVert)) /2.0)
Error Info: could not convert string to float: 'None' ArcPy ERRORS: Start Time: Thursday, January 11, 2018 11:36:17 AM Succeeded at Thursday, January 11, 2018 11:36:17 AM (Elapsed Time: 0.01 seconds) Completed script Create GRG from Point... Failed to execute (CreateGRGFromPoint). Failed at Thursday, January 11, 2018 11:38:27 AM (Elapsed Time: 1.60 seconds)
I think the solution to this could be better error handling in the Py script to detect whether or not a single point actually exists in the input feature class, and to fail gracefully with a message indicating that a point feature input is required when this happens.
Steps to Reproduce (for bugs)
Your Environment
Pro 2.1 10257/ latest released Clearing Operations template Windows 8.1 Enterprise