SchemingException: Could not load ckanext.scheming:test.json
- Dominant language
- Python
- Stars
- 102
- Forks
- 182
- PR merge metrics
- No merged PRs in 30d
Description
Using CKAN 2.8.3 on Ubuntu 18.04 Server in a Azure VM, there is an error that occurs anytime I try to load in a new JSON file. This error does not occur with ckan_default.json or camel_photos.json. If I attempt to change either of them, the changes are not reflected in CKAN. I did try running this as the only CKAN extension installed, and still get the same issue. I have also tried this on a fresh CKAN installation and still have the same problem. Below is the error in the logs:
`
[Fri Jan 24 13:32:18.729920 2020] [wsgi:error] [pid 8520:tid 139861279778560] 2020-01-24 13:32:18,729 INFO [ckan.config.environment] Loading static files from public
[Fri Jan 24 13:32:18.804985 2020] [wsgi:error] [pid 8520:tid 139861279778560] 2020-01-24 13:32:18,804 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Fri Jan 24 13:32:19.440698 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] mod_wsgi (pid=8520): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as Python modu$
[Fri Jan 24 13:32:19.440731 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] mod_wsgi (pid=8520): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Fri Jan 24 13:32:19.440753 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] Traceback (most recent call last):
[Fri Jan 24 13:32:19.440768 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/etc/ckan/default/apache.wsgi", line 10, in
[Fri Jan 24 13:32:19.440787 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] _application = loadapp('config:%s' % config_filepath)
[Fri Jan 24 13:32:19.440795 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loada$
[Fri Jan 24 13:32:19.440806 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] return loadobj(APP, uri, name=name, **kw)
[Fri Jan 24 13:32:19.440822 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loado$
[Fri Jan 24 13:32:19.440832 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] return context.create()
[Fri Jan 24 13:32:19.440839 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Fri Jan 24 13:32:19.440848 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] return self.object_type.invoke(self)
[Fri Jan 24 13:32:19.440854 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Fri Jan 24 13:32:19.440862 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] return fix_call(context.object, context.global_conf, **context.local_conf)
[Fri Jan 24 13:32:19.440868 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Fri Jan 24 13:32:19.440878 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] val = callable(*args, **kw)
[Fri Jan 24 13:32:19.440883 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 55, in make_app
[Fri Jan 24 13:32:19.440892 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] load_environment(conf, app_conf)
[Fri Jan 24 13:32:19.440898 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 116, in load_environment
[Fri Jan 24 13:32:19.440908 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] p.load_all()
[Fri Jan 24 13:32:19.440913 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 140, in load_all
[Fri Jan 24 13:32:19.440922 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] load(*plugins)
[Fri Jan 24 13:32:19.440928 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 168, in load
[Fri Jan 24 13:32:19.440936 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] plugins_update()
[Fri Jan 24 13:32:19.440942 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 122, in plugins_update
[Fri Jan 24 13:32:19.440950 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] environment.update_config()
[Fri Jan 24 13:32:19.440956 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 168, in update_config
[Fri Jan 24 13:32:19.440965 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] plugin.update_config(config)
[Fri Jan 24 13:32:19.440970 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext/scheming/plugins.py", line 158, in up$
[Fri Jan 24 13:32:19.440979 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] self.SCHEMA_TYPE_FIELD
[Fri Jan 24 13:32:19.440985 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext/scheming/plugins.py", line 351, in _l$
[Fri Jan 24 13:32:19.440994 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] schema = _load_schema(n)
[Fri Jan 24 13:32:19.441003 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext/scheming/plugins.py", line 359, in _l$
[Fri Jan 24 13:32:19.441013 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] schema = _load_schema_url(url)
[Fri Jan 24 13:32:19.441018 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext/scheming/plugins.py", line 387, in _l$
[Fri Jan 24 13:32:19.441027 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] raise SchemingException("Could not load %s" % url)
[Fri Jan 24 13:32:19.441042 2020] [wsgi:error] [pid 8520:tid 139861279778560] [remote 127.0.0.1:58550] SchemingException: Could not load ckanext.scheming:test.json
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ckanext/scheming/plugins.py, particularly _load_schema and _load_schema_url, and reproduce the failure using the reported CKAN 2.8.3 setup and ckanext.scheming:test.json. Compare this with ckan_default.json and camel_photos.json. Done means custom JSON schemas load successfully and subsequent edits are reflected in CKAN.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100