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

Add more detailed logging for shapefile load errors #13

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gbDataCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down