smnorris / bcfishpass

Model and monitor aquatic habitat connectivity in BC. Tools to plan and prioritize the assessment and remediation of barriers.
https://smnorris.github.io/bcfishpass
Apache License 2.0
8 stars 13 forks source link

db build fails on whse_admin_boundaries.adm_nr_districts_spg #598

Open smnorris opened 1 week ago

smnorris commented 1 week ago

When building a new database, db/sources/migrate.sh bails due to lack of info coming from bcdc api:

bcdata bc2pg -e -c 1 whse_admin_boundaries.adm_nr_districts_spg
2024-11-12 13:10:10,493:INFO:bcdata.wfs: Total features requested: 1
2024-11-12 13:10:10,772:WARNING:bcdata.bcdc: BC Data Catalouge API search provides no schema for: WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG
Traceback (most recent call last):
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/bin/bcdata", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/bcdata/cli.py", line 412, in bc2pg
    out_table = bcdata.bc2pg(
                ^^^^^^^^^^^^^
  File "/Users/snorris/Projects/repo/bcfishpass/.venv/lib/python3.12/site-packages/bcdata/bc2pg.py", line 96, in bc2pg
    raise ValueError(
ValueError: Cannot create table, schema details not found via bcdc api
smnorris commented 1 week ago

Issue is with bcdata and the catalogue api: https://github.com/smnorris/bcdata/issues/200