Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running BAL toolbox ArcGIS10.5 #12

Open
Mdarmody opened this issue Jun 8, 2017 · 1 comment
Open

Error running BAL toolbox ArcGIS10.5 #12

Mdarmody opened this issue Jun 8, 2017 · 1 comment

Comments

@Mdarmody
Copy link

Mdarmody commented Jun 8, 2017

Executing: BAL "C:\Data\BAL Toolbox\BAL-2.1.2\examples\input\jerram_dem" "C:\Data\BAL Toolbox\BAL-2.1.2\examples\input\jerram_veg" "1 6;2 1;3 1;4 1;5 13 2;14 5;15 18 3;19 22 7;23 4;24 25 NODATA;26 4;27 28 NODATA;29 4;30 1;31 2;32 5;99 NODATA" "C:\Data\BAL Toolbox\BAL-2.1.2\examples\output" 80 #
Start Time: Thu Jun 08 11:39:59 2017
Running script BAL...
DEM's spatial reference type is Projected
Get the area of interest from the input extent ...
Failed script BAL...

Traceback (most recent call last):
File "C:\Data\BAL Toolbox\BAL-2.1.2\bal.py", line 371, in
run()
File "C:\Data\BAL Toolbox\BAL-2.1.2\bal.py", line 357, in run
mask = find_aoi(extent, dem, veg)
File "C:\Data\BAL Toolbox\BAL-2.1.2\bal.py", line 317, in find_aoi
get_extent_mask(extent, mask)
File "C:\Data\BAL Toolbox\BAL-2.1.2\bal.py", line 247, in get_extent_mask
array.add(arcpy.Point(float(extent_list[0]), float(extent_list[1])))
ValueError: could not convert string to float: None

Failed to execute (BAL).
Failed at Thu Jun 08 11:39:59 2017 (Elapsed Time: 0.09 seconds)

@CEKrause CEKrause added the Bug label Jun 8, 2017
@wcarthur
Copy link
Member

Appears to be the way 10.5 handles the arcpy.Describe().extent attribute. If this option is set to "Default", "Union of Inputs" or "Intersection of Inputs", then 10.5 returns "None". If the extent is specified manually, or a dataset is selected, then the tool executes as expected.

in bal.py l247, I added `arcpy.AddMessage("Extent: %s"%repr(extent_list))

On ArcGIS 10.5, using "Default" option for Extent:

Running script BAL...
DEM's spatial reference type is Projected
Get the area of interest from the input extent ...
Extent: ['None']
Failed script BAL...

Traceback (most recent call last):
File "C:\Users\u12161\Downloads\BAL\BAL-master\bal.py", line 371, in
run()
File "C:\Users\u12161\Downloads\BAL\BAL-master\bal.py", line 357, in run
mask = find_aoi(extent, dem, veg)
File "C:\Users\u12161\Downloads\BAL\BAL-master\bal.py", line 317, in find_aoi
get_extent_mask(extent, mask)
File "C:\Users\u12161\Downloads\BAL\BAL-master\bal.py", line 247, in get_extent_mask
array.add(arcpy.Point(float(extent_list[0]), float(extent_list[1])))
ValueError: could not convert string to float: None

On ArcGIS 10.3:

Running script BAL...
DEM's spatial reference type is Projected
Get the area of interest from the input extent ...
Extent: ['717363.28258812', '6190392.84914239', '719513.28258812', '6192167.84914239', 'NaN', 'NaN', 'NaN', 'NaN']
...

Temporary fix

Set the extent option, either by specifying a raster to match the extent of, or selecting "As specified below" and entering values in the four entry boxes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants