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

BRAT: Errors were found inserting records into the database #454

Closed
KellyMWhitehead opened this issue Oct 15, 2021 · 2 comments
Closed

BRAT: Errors were found inserting records into the database #454

KellyMWhitehead opened this issue Oct 15, 2021 · 2 comments
Assignees
Labels
🐛 bug Something isn't working pkg:BRAT BRAT Python Package

Comments

@KellyMWhitehead
Copy link
Contributor

There were 100 or so "Integrity Error when inserting records" log messages before the following error:

2021-10-14 18:39:33:: [error] [Vegetation] Integrity Error when inserting records: ReachID: 17108 VegetationID: -9999
2021-10-14 18:39:33:: [error] [Vegetation] Integrity Error when inserting records: ReachID: 17109 VegetationID: -9999
2021-10-14 18:39:33:: [error] [Vegetation] Integrity Error when inserting records: ReachID: 17110 VegetationID: -9999
2021-10-14 18:39:33:: [error] [BRAT Build] Errors were found inserting records into the database. Cannot continue.
2021-10-14 18:39:33:: Traceback (most recent call last):
2021-10-14 18:39:33::   File "/usr/local/src/riverscapes-tools/packages/brat/sqlbrat/brat_build.py", line 310, in main
2021-10-14 18:39:33::     brat_build(
2021-10-14 18:39:33::   File "/usr/local/src/riverscapes-tools/packages/brat/sqlbrat/brat_build.py", line 201, in brat_build
2021-10-14 18:39:33::     vegetation_summary(outputs_gpkg_path, '{} {}m'.format(label, buffer), veg_raster, buffer)
2021-10-14 18:39:33::   File "/usr/local/src/riverscapes-tools/packages/brat/sqlbrat/utils/vegetation_summary.py", line 92, in vegetation_summary
2021-10-14 18:39:33::     raise Exception('Errors were found inserting records into the database. Cannot continue.')
2021-10-14 18:39:33:: Exception: Errors were found inserting records into the database. Cannot continue.
2021-10-14 18:39:33:: <<BRAT PROCESS ENDED WITH AN ERROR>>\n\n

Hucs: 17010215,
FAILED-17010216.log

@KellyMWhitehead KellyMWhitehead added 🐛 bug Something isn't working pkg:BRAT BRAT Python Package labels Oct 15, 2021
@KellyMWhitehead KellyMWhitehead self-assigned this Oct 15, 2021
@philipbaileynar
Copy link
Contributor

This suggests the veg rasters have nodata in them. I think we should filter these values out and not store them in the geopackage. I wonder if doing so will skew the veg statistics? Might be worth eyeballing where these -9999 values occur in the veg rasters.

@KellyMWhitehead
Copy link
Contributor Author

fixed in bfcb8c8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working pkg:BRAT BRAT Python Package
Projects
None yet
Development

No branches or pull requests

2 participants