ckan.plugins.core.PluginNotFoundException:示例主题

ckan.plugins.core.PluginNotFoundException:示例主题

我使用 ubuntu server 20.4 和 CKAN 作为我的开放数据门户。我只是遵循他们的官方文档

https://docs.ckan.org/en/2.9/theming/templates.html

我已经执行了这个命令

/usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src
ckan -c /etc/ckan/default/ckan.ini create -t ckanext ckanext-example_theme

我已经按照步骤添加

ckan.plugins = stats text_view recline_view example_theme

/etc/ckan/default/ckan.ini

并执行

python setup.py develop
and in /usr/lib/ckan/default/src/ckan and in /usr/lib/ckan/default/src/ckan/ckanext-example_theme/ckanext

会出现这样的错误

(default) root@ccgeo:/usr/lib/ckan/default/src/ckan/ckanext-example_theme# ckan -c /etc/ckan/default/ckan.ini run
2021-10-27 09:06:45,948 INFO  [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2021-10-27 09:06:45,948 INFO  [ckan.config.environment] Loading static files from public
2021-10-27 09:06:45,980 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/ckan", line 11, in <module>
    load_entry_point('ckan', 'console_scripts', 'ckan')()
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 781, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1212, in parse_args
    rest = Command.parse_args(self, ctx, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1630, in handle_parse_result
    value = invoke_param_callback(self.callback, ctx, self, value)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 123, in invoke_param_callback
    return callback(ctx, param, value)
  File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 102, in _init_ckan_config
    ctx.obj = CkanCommand(value)
  File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 52, in __init__
    self.app = make_app(self.config)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 56, in make_app
  File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 123, in load_environment
    p.load_all()
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 165, in load_all
    load(*plugins)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 179, in load
    service = _get_service(plugin)
ckan.plugins.core.PluginNotFoundException: example_themere.py", line 282, in _get_service
    raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: example_theme
    load_environment(conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 123, in load_environment
    p.load_all()
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 165, in load_all
    load(*plugins)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 179, in load
    service = _get_service(plugin)
ckan.plugins.core.PluginNotFoundException: example_themere.py", line 282, in _get_service
    raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: example_theme

有什么帮助吗?

相关内容