Open johngallo opened 1 year ago
Dear John, Thank you for your help! It is so useful to make a file from scratch in excel! Thank you very much again!
Great, thank you for the feedback. If you have a moment to share the versions of excel and ArcGIS (and Windows?) that you are using and that this worked for, that would be much appreciated. Otherwise the above feedback is great on its own. Cheers!
The tool is extremely fragile with later versions of Office. Possibly anything later than 2014 based on the error message.
Sample data runs if you put it in the directory as outlined in the sample data spreadsheet. Not anywhere else, since that requires an edit to the sample data spreadsheet...
OK, so it appears that when you make a change to a working file in Office2019 it says, “this file is not enabled to protect your safety. Do you want to enable editing?” or something to that effect. and if you click yes, then that does something that then makes the data unreadable by Gnarly Tools.
But…If you edit the sample excel file in Google Docs, this does not happen. and you are able to then run the model with edits…
it may be that if you make a file from scratch in excel this won't be a problem.
Seems like the quick fix is to add this to error messages, longer fix is to fix the problem.
More details are in my GIS notes for the Wolf project on today's date.
Here is an example error message:
Executing: CoreMapper2 D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\CoreMapperDemo\CoreMapperDemoParametersWolfDirectory.xlsx Start Time: Fri Mar 31 11:42:53 2023 Running script CoreMapper2... Failed script CoreMapper2...
Traceback (most recent call last): File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\CoreMapper.py", line 57, in
wb = load_workbook(filename=tables[0])
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\excel.py", line 149, in load_workbook
_load_workbook(wb, archive, filename, read_only, keep_vba)
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\excel.py", line 236, in _load_workbook
color_index=wb._colors)
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\worksheet.py", line 327, in read_worksheet
fast_parse(ws, xml_source, shared_strings, style_table, color_index)
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\worksheet.py", line 315, in fast_parse
parser.parse()
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\worksheet.py", line 94, in parse
dispatchertag_name
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\reader\worksheet.py", line 291, in parse_data_validation
dv = parser(tag)
File "D:\GIS\Projects\Wolf_Haven\Tasks\Connectivity\Tools\Scripts\Gnarly_Landscape_Utilities_0_1_9\Toolbox\scripts\openpyxl\worksheet\datavalidation.py", line 225, in parser
dv = DataValidation(**element.attrib)
TypeError: init() got an unexpected keyword argument '{http://schemas.microsoft.com/office/spreadsheetml/2014/revision}uid'
Failed to execute (CoreMapper2). Failed at Fri Mar 31 11:42:54 2023 (Elapsed Time: 0.62 seconds)