# ckanext-ed Python 3 compatibility CLI commands Review Fixes: * [x] `ckan -c ckan.ini edcli level-column` > None * [x] `ckan -c ckan.ini edcli broken-links-report` > * Remove [Line 1](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/broken_links_report.py#L1) > > * Requires deadoralive > * Requires py3 branch * [x] `ckan -c ckan.ini edcli download-resources <TYPE> <NAME> [restore]` > * Remove [Line 23](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/download_resources.py#L23) > > * Requires py3 branch * [x] EdCli > * Fails in py3, Use relative imports instead: [Lines 2 - 10](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/edcli.py#L2-L10) * [x] ckan -c ckan.ini edcli fix-extras > * Remove [Line 15](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/fix_extras.py#L15) * [ ] ckan -c ckan.ini edcli omb-to-sources > * Replace `import urllib2`: [Line 4](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/omb_to_sources.py#L4) > with: > ```python > from urllib.request import urlopen > from urllib.error import URLError > ``` > * Replace [Line 126](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/omb_to_sources.py#L126) `omb_inventory_read = urllib2.urlopen(url).read()` with > ```python > omb_inventory_read = urlopen(url).read() > ``` > * Replace [Line 126](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/omb_to_sources.py#L128) `except urllib2.URLError as e:` with > ```python > except URLError as e: > ``` * [ ] ckan -c ckan.ini edcli populate-recordsdb > * Remove [Lines 10-53](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/populate_recordsdb.py#L10-L53) and [Line 4](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/populate_recordsdb.py#L4) > * Url: `https://www2.ed.gov/notices/records-management/index.html` not working: > ``` > File "/srv/app/src/ckanext-ed/ckanext/ed/commands/populate_recordsdb.py", line 81, in fetchdata > raise ValueError('Could not access the provided url') > ``` > URL not currently working anyways, this can move on * [x] `ckan -c ckan.ini edcli init-record-schedule` > None * [x] Seed.py > Remove [Line 16](https://github.com/CivicActions/ckanext-ed/blob/20140d59454b704aae049806a166b14b0d01bd94/ckanext/ed/commands/seeds.py#L16) * [x] `ckan -c ckan.ini edcli ed create_ed_organizations` * [x] `ckan -c ckan.ini edcli ed create_ed_groups` * [x] `ckan -c ckan.ini edcli ed create_ed_data_explorers` * [x] `ckan -c ckan.ini edcli ed create_ed_vocabularies` > `ckan.logic.NotAuthorized: Action vocabulary_create requires an authenticated user` > Replace `context = {'model': model, 'session': model.Session}` on [Line 109](https://github.com/CivicActions/ckanext-ed/blob/240cc022f6d46b3fea63fe83e643ac0a7a6b5ac3/ckanext/ed/commands/seeds.py#L109) with `context = {'model': model, 'session': model.Session, 'ignore_auth': True}`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up