无法运行ckanext-qa扩展

时间:2014-06-10 07:00:37

标签: config qa ckan

我正在使用CKAN作为我的开放数据门户,并已根据https://github.com/ckan/ckanext-qa/的说明成功安装了CKAN质量保证扩展。我目前正面临这一步的一些问题:

  

可以通过运行相关的贴纸命令来执行此步骤   来自ckanext-qa目录。

$ paster qa update|clean [package name/id] --config=<path to ckan config file>

我收到此错误:

/usr/lib/ckan/default/src/ckanext-qa-master$ paster qa update|clean --config=/etc/ckan/default
No command 'clean' found, did you mean:
 Command 'uclean' from package 'svn-buildpackage' (universe)
 Command 'clear' from package 'ncurses-bin' (main)
clean: command not found
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/src/ckanext-qa-master/ckanext/qa/commands.py", line 50, in command
    self._load_config()
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 91, in _load_config
    conf = self._get_config()
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 86, in _get_config
    raise AssertionError('Config filename %r does not exist.' % self.filename)
AssertionError: Config filename '/usr/lib/ckan/default/src/ckanext-qa-master/development.ini' does not exist.

我的ckanext-qa目录是/usr/lib/ckan/default/src/ckanext-qa-master,我的ckan配置文件位于/etc/ckan/default。我是否正确运行了命令?感谢是否有人可以帮助解决我的问题。感谢。

1 个答案:

答案 0 :(得分:1)

您运行的命令中有2个错误。首先,“更新|清洁”代表“更新或清理”。此外,您没有指定正确的配置文件路径。请参阅以下正确的更新和清除命令:

paster qa update --config=/etc/ckan/default/development.ini
paster qa clean --config=/etc/ckan/default/development.ini

此外,有两种方法可以运行扩展程序特定的贴纸命令:

  1. 导航到ckanext-qa目录并执行命令:

    paster qa update --config = / etc / ckan / default / development.ini

  2. 明确指定扩展名,然后运行命令

    paster --plugin = ckanext-qa qa update --config = / etc / ckan / default / development.ini