“ paster color”尽管被列出为可用,但在ckan 2.8.3中不起作用

问题描述 投票:0回答:1

我是ckan的新手。我使用的版本是ckan 2.8.3(稳定版本),从源代码安装在Ubuntu16.04LTS上。我目前安装了ckanext-scheming,datastore,datapusher插件。

我想添加新的配色方案,所以我运行了以下命令

. /usr/lib/ckan/default/bin/activate

cd /usr/lib/ckan/default/src/ckan

paster color "#0066aa"

以下是我得到的错误。

Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 10, in <module>
    sys.exit(run())
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 102, 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 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/ckan/lib/cli.py", line 1734, in command
    path = os.path.join(path, '..', public, 'base', 'less', 'custom.less')
  File "/usr/lib/ckan/default/lib/python2.7/posixpath.py", line 68, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

我不确定paster运行时是什么问题color的命令已正确列出

Usage: /usr/lib/ckan/default/bin/paster COMMAND
Usage: paster [paster_options] COMMAND [command_options]
Options:
  --version         show program's version number and exit
  --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg
                    specs; will also require() the Egg)
  -h, --help        Show this help message
Commands:
  create            Create the file layout for a Python distribution
  help              Display help
  make-config       Install a package and create a fresh config file/directory
  points            Show information about entry points
  post              Run a request for the described application
  request           Run a request for the described application
  serve             Serve the described application
  setup-app         Setup an application, given a config file
ckan:
  check-po-files    Check po files for common mistakes
  color             Create or remove a color scheme.
  config-tool       Tool for editing options in a CKAN config file
  create-test-data  Create test data in the database.
  datapusher        Perform commands in the datapusher
  dataset           Manage datasets
  datastore         Perform commands to set up the datastore
  db                Perform various tasks on the database.
  front-end-build   Creates and minifies css and JavaScript files
  jobs              Manage background jobs
  less              Compile all root less documents into their CSS counterparts
  minify            Create minified versions of the given Javascript and CSS files.
  notify            Send out modification notifications.
  plugin-info       Provide info on installed plugins.
  profile           Code speed profiler

我也尝试过使用paster --plugin=ckan color "#0066aa"运行,并得到了相同的错误。我尝试调用其他命令(例如job / profile / etc。尽管我实际上没有运行它们),但ckan似乎可以毫无问题地找到它。

感谢您的帮助。谢谢。

ckan
1个回答
0
投票

我认为这是一个错误。我遇到了同样的问题。使用最新的docker镜像,当我运行该命令时遇到相同的问题。如果您在https://github.com/ckan/ckan/issues上提出了一个错误,可以查看导致问题的原因]

/usr/local/bin/ckan-paster --plugin=ckan color "#0066aa"
Traceback (most recent call last):
  File "/usr/local/bin/ckan-paster", line 8, in <module>
    sys.exit(run())
  File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/venv/src/ckan/ckan/lib/cli.py", line 1616, in command
    path = os.path.join(path, '..', public, 'base', 'less', 'custom.less')
  File "/usr/lib/ckan/venv/lib/python2.7/posixpath.py", line 68, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
© www.soinside.com 2019 - 2024. All rights reserved.