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

dataset bc-transmission-lines fails #32

Closed
smnorris opened this issue Feb 20, 2018 · 5 comments
Closed

dataset bc-transmission-lines fails #32

smnorris opened this issue Feb 20, 2018 · 5 comments
Labels

Comments

@smnorris
Copy link
Owner

$ bc2pg bc-transmission-lines
Traceback (most recent call last):
  File "/usr/local/bin/bc2pg", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pgdata/cli.py", line 26, in cli
    info = db.bcdata2pg(dataset, email)
  File "/usr/local/lib/python2.7/site-packages/pgdata/database.py", line 367, in bcdata2pg
    dl = bcdata.download(url, email)
  File "/usr/local/lib/python2.7/site-packages/bcdata/main.py", line 57, in download
    raise ValueError('Specified package is not available via DWDS')
ValueError: Specified package is not available via DWDS

A manual download works fine.

@smnorris
Copy link
Owner Author

No resource urls include a direct DWDS link, instead they look like this:

https://catalogue.data.gov.bc.ca/api/ofi/ESRI%20File%20Geodatabase/WHSE_BASEMAPPING.GBA_TRANSMISSION_LINES_SP
https://catalogue.data.gov.bc.ca/api/ofi/CSV/WHSE_BASEMAPPING.GBA_TRANSMISSION_LINES_SP
https://catalogue.data.gov.bc.ca/api/ofi/GeoJSON/WHSE_BASEMAPPING.GBA_TRANSMISSION_LINES_SP

Pointing a browser to these urls gives a 404.

@smnorris
Copy link
Owner Author

It looks like this dataset/package is using an updated method for generating dwds orders, there is an api called dwds-ofi:

https://apps.gov.bc.ca/pub/dwds-ofi/
https://github.com/bcgov/ckanext-bcgov/blob/aa5e1cf168e4195cfbbdeb7cdc94b3a82f4fbb1f/ckanext/bcgov/fanstatic/edc_pow.js

@smnorris
Copy link
Owner Author

It seems there are a number of other datasets/packages with this setup, bcdata needs to be updated to be functional.

@smnorris
Copy link
Owner Author

smnorris commented Jun 26, 2018

Same problem with local-and-regional-greenspaces.
Interestingly, accessing this doesn't work well even with a web browser - it relies on a pop-up which gets blocked.

@smnorris
Copy link
Owner Author

smnorris commented Jul 9, 2018

ckanapi may be a better way to interface with the catalogue

eg

ckanapi action package_show id=local-and-regional-greenspaces -r https://catalogue.data.gov.bc.ca/

@smnorris smnorris added the bug label Jul 9, 2018
@smnorris smnorris closed this as completed Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant