Skip to content

Commit

Permalink
Merge pull request #13 from rohith4444/patch-1
Browse files Browse the repository at this point in the history
Add more detailed logging for shapefile load errors
DanRunfola authored Sep 22, 2023
2 parents cdf30a2 + 5a58560 commit 6f2404a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gbDataCheck.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,8 @@ def geometryCheck(ws):
dta = geopandas.read_file("tmp/" + shp[0])
except Exception as e:
gbHelpers.logWrite(ws["checkType"], "CRITICAL ERROR: The shape file provided failed to load. Make sure all required files are included (i.e., *.shx).")
gbHelpers.logWrite(ws["checkType"], "CRITICAL ERROR: " + str(e))
gbHelpers.logWrite(ws["checkType"], "CRITICAL ERROR str(e): " + str(e))
gbHelpers.logWrite(ws["checkType"], "CRITICAL ERROR str(shp): " + str(shp))
gbHelpers.logWrite(ws["checkType"], "If the above critical error is not helpful in debugging this file, we have found that opening a shapefile created in ESRI products, saving it using QGIS, and then re-uploading will allow geoPandas to open the file.")
checkFail = 1
break

0 comments on commit 6f2404a

Please sign in to comment.