DOI-USGS / gems-tools-pro

GeMS Tools for ArcGIS Pro
Creative Commons Zero v1.0 Universal
45 stars 15 forks source link

Validate DB in Pro #83

Closed sdudash closed 9 months ago

sdudash commented 11 months ago

Does not validate: Validate Database

Parameters

Input geodatabase or geopackage D:_COVID_SAFSOC_Dudash\PMF\GISdata\ProSunfairDB.gdb Output workspace D:_COVID_SAFSOC_Dudash\PMF\GISdata\ValidateGDB Validate standalone file
Validate embedded metadata
Report errors with _ID, not OBJECTID false Skip topology checks false Refresh GeoMaterialDict true Delete unused Glossary and DataSources rows true Compact GDB true Open report when done true

Messages

Start Time: Friday, September 29, 2023 9:14:15 AM This version of the tool is up to date: GeMS_ValidateDatabase.py, version of 9/28/2023 Refreshing GeoMaterialDict Replacing GeoMaterial domain Assigning domain to GeoMaterial ​ Looking at level 2 compliance Rule 2.1 - Has required elements: nonspatial tables DataSources, DescriptionOfMapUnits, GeoMaterialDict; feature dataset GeologicMap with feature classes ContactsAndFaults and MapUnitPolys Rule 2.2 - Required fields within required elements are present and correctly defined 2.3 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 2 topology rules: no internal gaps or overlaps in MapUnitPolys, boundaries of MapUnitPolys are covered by ContactsAndFaults Topology in GeologicMap found Looking at validation results for errors 2.4 All map units in MapUnitPolys have entries in DescriptionOfMapUnits table 2.5 No duplicate MapUnit values in DescriptionOfMapUnits table 2.6 Certain field values within required elements have entries in Glossary table 2.7 No duplicate Term values in Glossary table 2.8 All xxxSourceID values in required elements have entries in DataSources table 2.9 No duplicate DataSources_ID values in DataSources table ​ Looking at level 3 compliance 3.1 Table and field definitions conform to GeMS schema 3.2 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 3 topology rules: no overlaps, self-overlaps, or self-intersections in ContactsAndFaults. 3.3 No missing required values 3.4 No missing terms in Glossary 3.5 No unnecessary terms in Glossary Removing unused terms from Glossary 3.6 No missing sources in DataSources 3.7 No unnecessary sources in DataSources Removing unused sources from DataSources 3.8 No map units without entries in DescriptionOfMapUnits 3.9 No unnecessary map units in DescriptionOfMapUnits 3.10 HierarchyKey values in DescriptionOfMapUnits are unique and well formed Traceback (most recent call last): File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 1710, in dmu_path = db_dict["DescriptionOfMapUnits"]["catalogPath"] File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 1630, in main

if result[0] == 1:

File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 848, in rule3_10 ] TypeError: 'NoneType' object is not iterable

Failed script Validate Database... Failed to execute (ValidateDatabase). Failed at Friday, September 29, 2023 9:14:32 AM (Elapsed Time: 16.98 seconds)

ethoms-usgs commented 11 months ago

This is another case of the line numbers not making any sense, which suggests that Pro is reading one file but reporting errors against an older, cached file. Try closing Pro completely down and trying again. If the error doesn't go away, hopefully it will at least get reported correctly and I can start to track it down.

sdudash commented 11 months ago

I closed down Pro, opened a new map, added my database and tried to validate. This is the error:

Validate Database

Parameters

Input geodatabase or geopackage D:_COVID_SAFSOC_Dudash\PMF\GISdata\ProSunfairDB.gdb Output workspace D:_COVID_SAFSOC_Dudash\PMF\GISdata\ValidateGDB Validate standalone file Validate embedded metadata Report errors with _ID, not OBJECTID false Skip topology checks false Refresh GeoMaterialDict false Delete unused Glossary and DataSources rows false Compact GDB true Open report when done true

Messages

Start Time: Friday, September 29, 2023 9:45:21 AM This version of the tool is up to date: GeMS_ValidateDatabase.py, version of 9/28/2023 ​ Looking at level 2 compliance Rule 2.1 - Has required elements: nonspatial tables DataSources, DescriptionOfMapUnits, GeoMaterialDict; feature dataset GeologicMap with feature classes ContactsAndFaults and MapUnitPolys Rule 2.2 - Required fields within required elements are present and correctly defined 2.3 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 2 topology rules: no internal gaps or overlaps in MapUnitPolys, boundaries of MapUnitPolys are covered by ContactsAndFaults       Topology in GeologicMap found             Looking at validation results for errors 2.4 All map units in MapUnitPolys have entries in DescriptionOfMapUnits table 2.5 No duplicate MapUnit values in DescriptionOfMapUnits table 2.6 Certain field values within required elements have entries in Glossary table 2.7 No duplicate Term values in Glossary table 2.8 All xxxSourceID values in required elements have entries in DataSources table 2.9 No duplicate DataSources_ID values in DataSources table ​ Looking at level 3 compliance 3.1 Table and field definitions conform to GeMS schema 3.2 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 3 topology rules: no overlaps, self-overlaps, or self-intersections in ContactsAndFaults. 3.3 No missing required values 3.4 No missing terms in Glossary 3.5 No unnecessary terms in Glossary 3.6 No missing sources in DataSources 3.7 No unnecessary sources in DataSources 3.8 No map units without entries in DescriptionOfMapUnits 3.9 No unnecessary map units in DescriptionOfMapUnits 3.10 HierarchyKey values in DescriptionOfMapUnits are unique and well formed Traceback (most recent call last): File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 1710, in dmu_path = db_dict["DescriptionOfMapUnits"]["catalogPath"] File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 1630, in main

if result[0] == 1:

File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.5\Scripts\GeMS_ValidateDatabase.py", line 848, in rule3_10 ] TypeError: 'NoneType' object is not iterable

Failed script Validate Database... Failed to execute (ValidateDatabase). Failed at Friday, September 29, 2023 9:45:27 AM (Elapsed Time: 6.34 seconds)


Stephanie L Dudash
Geologist
US Geological Survey-GMEG Science Ctr
520 N Park Ave, Suite 357
Tucson, AZ 85719
520.670.5514
________________________________
From: Evan Thoms ***@***.***>
Sent: Friday, September 29, 2023 9:41 AM
To: DOI-USGS/gems-tools-pro ***@***.***>
Cc: Dudash, Stephanie L ***@***.***>; Author ***@***.***>
Subject: [EXTERNAL] Re: [DOI-USGS/gems-tools-pro] Validate DB in Pro (Issue #83)

 This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.

This is another case of the line numbers not making any sense, which suggests that Pro is reading one file but reporting errors against an older, cached file. Try closing Pro completely down and trying again. If the error doesn't go away, hopefully it will at least get reported correctly and I can start to track it down.

—
Reply to this email directly, view it on GitHub<https://github.com/DOI-USGS/gems-tools-pro/issues/83#issuecomment-1741193072>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATDGULXJISYG4LA7RLD22VDX4322TANCNFSM6AAAAAA5MWIXIQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
ethoms-usgs commented 11 months ago

Hmm, exactly the same. Try downloading the latest release (v2.12.6) The edits have nothing to do with this issue, but maybe, again, we'll get line numbers that make sense. Couldn't hurt to do a full restart as well and clean out any old copies of the toolbox.

sdudash commented 11 months ago

Ugh, I restarted my computer, downloaded the new release, and opened a new Pro template. I think this is the same issue. The tool in ArcMap does work, though and gives me appropriate errors. But, that doesn't solve the bigger issue at hand.

Thanks for all of your hard work addressing all of these issues.

Cheers, Stephanie

Validate Database

Parameters

Input geodatabase or geopackage D:_COVID_SAFSOC_Dudash\PMF\GISdata\ProSunfairDB.gdb Output workspace D:_COVID_SAFSOC_Dudash\PMF\GISdata\ValidateGDB Validate standalone file Validate embedded metadata Report errors with _ID, not OBJECTID false Skip topology checks false Refresh GeoMaterialDict false Delete unused Glossary and DataSources rows false Compact GDB true Open report when done true

Messages

Start Time: Friday, September 29, 2023 12:46:19 PM This version of the tool is up to date: GeMS_ValidateDatabase.py, version of 9/28/2023 ​ Looking at level 2 compliance Rule 2.1 - Has required elements: nonspatial tables DataSources, DescriptionOfMapUnits, GeoMaterialDict; feature dataset GeologicMap with feature classes ContactsAndFaults and MapUnitPolys Rule 2.2 - Required fields within required elements are present and correctly defined 2.3 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 2 topology rules: no internal gaps or overlaps in MapUnitPolys, boundaries of MapUnitPolys are covered by ContactsAndFaults       Topology in GeologicMap found             Looking at validation results for errors 2.4 All map units in MapUnitPolys have entries in DescriptionOfMapUnits table 2.5 No duplicate MapUnit values in DescriptionOfMapUnits table 2.6 Certain field values within required elements have entries in Glossary table 2.7 No duplicate Term values in Glossary table 2.8 All xxxSourceID values in required elements have entries in DataSources table 2.9 No duplicate DataSources_ID values in DataSources table ​ Looking at level 3 compliance 3.1 Table and field definitions conform to GeMS schema 3.2 All MapUnitPolys and ContactsAndFaults based feature classes obey Level 3 topology rules: no overlaps, self-overlaps, or self-intersections in ContactsAndFaults. 3.3 No missing required values 3.4 No missing terms in Glossary 3.5 No unnecessary terms in Glossary 3.6 No missing sources in DataSources 3.7 No unnecessary sources in DataSources 3.8 No map units without entries in DescriptionOfMapUnits 3.9 No unnecessary map units in DescriptionOfMapUnits 3.10 HierarchyKey values in DescriptionOfMapUnits are unique and well formed Traceback (most recent call last): File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.6\Scripts\GeMS_ValidateDatabase.py", line 1710, in if "DescriptionOfMapUnits" in db_dict: File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.6\Scripts\GeMS_ValidateDatabase.py", line 1630, in main

result = arcpy.GetCount_management(ver_table)

File "D:\GeMS\LatestGeMSTools\20230929\gems-tools-pro-2.12.6\Scripts\GeMS_ValidateDatabase.py", line 848, in rule3_10 "UnusedTerms", TypeError: 'NoneType' object is not iterable

Failed script Validate Database... Failed to execute (ValidateDatabase). Failed at Friday, September 29, 2023 12:46:26 PM (Elapsed Time: 6.54 seconds)


Stephanie L Dudash
Geologist
US Geological Survey-GMEG Science Ctr
520 N Park Ave, Suite 357
Tucson, AZ 85719
520.670.5514
________________________________
From: Evan Thoms ***@***.***>
Sent: Friday, September 29, 2023 12:38 PM
To: DOI-USGS/gems-tools-pro ***@***.***>
Cc: Dudash, Stephanie L ***@***.***>; Author ***@***.***>
Subject: [EXTERNAL] Re: [DOI-USGS/gems-tools-pro] Validate DB in Pro (Issue #83)

 This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.

Hmm, exactly the same.
Try downloading the latest release (v2.12.6)<https://github.com/DOI-USGS/gems-tools-pro/releases/tag/v2.12.6>
The edits have nothing to do with this issue, but maybe, again, we'll get line numbers that make sense.
Couldn't hurt to do a full restart as well and clean out any old copies of the toolbox.

—
Reply to this email directly, view it on GitHub<https://github.com/DOI-USGS/gems-tools-pro/issues/83#issuecomment-1741393810>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATDGULTF452RTBEJMHW7AKTX44PSRANCNFSM6AAAAAA5MWIXIQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
ethoms-usgs commented 11 months ago

Yeah, darn. Can you send me your gdb?

sdudash commented 11 months ago

Well, this is interesting. I just tried to validate my database on my home laptop, and it worked fine. It returned the same errors as when I validated in ArcMap, so that's good. I'm not sure why my desktop would fail to run the script in a brand-new Pro project, even after restarting my computer.

Cheers, Stephanie


Stephanie L Dudash
Geologist
US Geological Survey-GMEG Science Ctr
520 N Park Ave, Suite 357
Tucson, AZ 85719
520.670.5514
________________________________
From: Evan Thoms ***@***.***>
Sent: Saturday, September 30, 2023 10:59 AM
To: DOI-USGS/gems-tools-pro ***@***.***>
Cc: Dudash, Stephanie L ***@***.***>; Author ***@***.***>
Subject: [EXTERNAL] Re: [DOI-USGS/gems-tools-pro] Validate DB in Pro (Issue #83)

 This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.

Yeah, darn. Can you send me your gdb?

—
Reply to this email directly, view it on GitHub<https://github.com/DOI-USGS/gems-tools-pro/issues/83#issuecomment-1741825710>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATDGULQOWLUJYCR44HZEZILX5BMYHANCNFSM6AAAAAA5MWIXIQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>