安装ckanext-viewhelpers时的PluginNotFoundException

时间:2014-06-09 03:22:19

标签: plugins view-helpers ckan

我使用CKAN作为我的开放数据门户网站,并尝试按照https://github.com/ckan/ckanext-viewhelpers上的说明安装ckanext-viewhelpers扩展程序。

/usr/lib/ckan/default/src/ckanext-viewhelpers-master$ sudo python setup.py installChecking .pth file support in /usr/local/lib/python2.7/dist-packages/

/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing ckanext_viewhelpers.egg-info/PKG-INFO
writing namespace_packages to ckanext_viewhelpers.egg-info/namespace_packages.txt
writing top-level names to ckanext_viewhelpers.egg-info/top_level.txt
writing dependency_links to ckanext_viewhelpers.egg-info/dependency_links.txt
writing entry points to ckanext_viewhelpers.egg-info/entry_points.txt
reading manifest file 'ckanext_viewhelpers.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ckanext_viewhelpers.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/ckanext
copying build/lib.linux-x86_64-2.7/ckanext/__init__.py -> build/bdist.linux-x86_64/egg/ckanext
creating build/bdist.linux-x86_64/egg/ckanext/viewhelpers
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/plugin.py -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/__init__.py -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers
creating build/bdist.linux-x86_64/egg/ckanext/viewhelpers/tests
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/tests/__init__.py -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/tests
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/tests/test_view.py -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/tests
creating build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public
creating build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public/vendor
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/public/vendor/queryStringToJSON.js -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public/vendor
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/public/resource.config -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/public/filters_form.css -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/public/filters.js -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public
copying build/lib.linux-x86_64-2.7/ckanext/viewhelpers/public/filters_form.js -> build/bdist.linux-x86_64/egg/ckanext/viewhelpers/public
byte-compiling build/bdist.linux-x86_64/egg/ckanext/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/ckanext/viewhelpers/plugin.py to plugin.pyc
byte-compiling build/bdist.linux-x86_64/egg/ckanext/viewhelpers/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/ckanext/viewhelpers/tests/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/ckanext/viewhelpers/tests/test_view.py to test_view.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/namespace_packages.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ckanext_viewhelpers.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/ckanext_viewhelpers-0.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing ckanext_viewhelpers-0.1-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/ckanext_viewhelpers-0.1-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/ckanext_viewhelpers-0.1-py2.7.egg
Extracting ckanext_viewhelpers-0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
ckanext-viewhelpers 0.1 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/ckanext_viewhelpers-0.1-py2.7.egg
Processing dependencies for ckanext-viewhelpers==0.1
Finished processing dependencies for ckanext-viewhelpers==0.1

但是我遇到了这个错误,我在CKAN配置文件中添加了viewhelpers后无法解决。

    paster serve /etc/ckan/default/development.ini

    Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 57, in make_app
    load_environment(conf, app_conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
    p.load_all(config)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
    load(*plugins)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 149, in load
    service = _get_service(plugin)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 256, in _get_service
    raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: viewhelpers

我在安装其他扩展时也遇到了相同的PluginNotFoundException,即使我在virtualenv上安装了扩展并将其添加到配置文件中,根据文档。感谢是否有人可以帮助解决我的问题。感谢。

1 个答案:

答案 0 :(得分:0)

我认为:

  1. 安装插件时没有激活virtualenv,或者

  2. 当您使用paster serve运行CKAN时,您没有激活virtualenv

  3. 如果为1,请激活您的virtualenv并重新安装插件。

    如果是2,请激活你的virtualenv。