我已经在 Ubuntu 16.04 上成功安装了 CKAN 2.8。我也成功安装了基本图表扩展。当我当时运行 ckan 插件信息时,我得到了一个格式很好的输出,没有错误(见下文。)
但是,当我随后使用相同的步骤安装 ckanext-dcat 时, ckan plugin-info 会产生以下结果:
root@localhost:/etc/ckan/default# ckan plugin-info
Traceback (most recent call last):
File "/usr/bin/ckan", line 45, in <module>
load_entry_point('PasteScript', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/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/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 1311, in command
self.get_info()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 1316, in get_info
self._load_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 330, in _load_config
self.site_user = load_config(self.options.config, load_site_user)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 237, in load_config
load_environment(conf.global_conf, conf.local_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 116, in load_environment
p.load_all()
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 140, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 154, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 257, in _get_service
raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: linechart
如果我然后重新安装基本图表扩展并执行 ckan plugin-info 那么一切都会恢复正常(见下文。)
请协助解决这个问题,因为我的主要目标是输入 rdf 数据集。
谢谢,比尔
没有 ckanext-dcat 的 ckan -plugin-info 输出(压缩到字符限制):
root@localhost:/etc/ckan/default/ckanext-basiccharts# ckan plugin-info
折线图:
实现:IConfigurer IResourceView
统计:
统计插件。实现:IConfigurer IRoutes
图像视图:
这个插件使用标签实现图像资源的视图:IConfigurer IResourceView
斜倚视图:
This extension views resources using a Recline MultiView.
实现:IConfigurer ITemplateHelpers get_dataproxy_url()
Returns the value of the ckan.recline.dataproxy_url config option
get_map_config()
Extracts and returns map view configuration of the reclineview extension.
IResourceView
文本视图:
此扩展预览 JSON(P)。实现:IConfigurer IConfigurable IResourceView
domain_object_mods:
A domain object level interface to change notifications
Triggered by all edits to table and related tables, which we filter
out with check_real_change.
实现:ISession
条形图:
实现:IConfigurer IResourceView
饼形图:
实现:IConfigurer IResourceView
基本网格:
实现: IConfigurer ITemplateHelpers view_data(resource_view) IResourceView
同步搜索:
自动更新搜索索引。实现:IDomainObjectModification
数据存储:
实现: IConfigurer IForkObserver IResourceController ITemplateHelpers datastore_dictionary(resource_id)
Return the data dictionary info for a resource
IActions
datastore_info(context, data_dict)
Returns information about the data imported, such as column names
and types.
:rtype: A dictionary describing the columns and their types.
:param id: Id of the resource we want info about
:type id: A UUID
datastore_function_create(context, data_dict)
Create a trigger function for use with datastore_create
:param name: function name
:type name: string
:param or_replace: True to replace if function already exists
(default: False)
:type or_replace: bool
:param rettype: set to 'trigger'
(only trigger functions may be created at this time)
:type rettype: string
:param definition: PL/pgSQL function body for trigger function
:type definition: string
datastore_create(context, data_dict)
Adds a new table to the DataStore.
The datastore_create action allows you to post JSON data to be
stored against a resource. This endpoint also supports altering tables,
aliases and indexes and bulk insertion. This endpoint can be called
multiple times to initially insert more data, add fields, change the
aliases or indexes as well as the primary keys.
To create an empty datastore resource and a CKAN resource at the same time,
provide ``resource`` with a valid ``package_id`` and omit the
``resource_id``.
If you want to create a datastore resource from the content of a file,
provide ``resource`` with a valid ``url``.
See :ref:`fields` and :ref:`records` for details on how to lay out records.
:param resource_id: resource id that the data is going to be stored
against.
:type resource_id: string
:param force: set to True to edit a read-only resource
:type force: bool (optional, default: False)
:param resource: resource dictionary that is passed to
:meth:`~ckan.logic.action.create.resource_create`.
Use instead of ``resource_id`` (optional)
:type resource: dictionary
:param aliases: names for read only aliases of the resource. (optional)
:type aliases: list or comma separated string
:param fields: fields/columns and their extra metadata. (optional)
:type fields: list of dictionaries
:param records: the data, eg: [{"dob": "2005", "some_stuff": ["a", "b"]}]
(optional)
:type records: list of dictionaries
:param primary_key: fields that represent a unique key (optional)
:type primary_key: list or comma separated string
:param indexes: indexes on table (optional)
:type indexes: list or comma separated string
:param triggers: trigger functions to apply to this table on update/insert.
functions may be created with
:meth:`~ckanext.datastore.logic.action.datastore_function_create`.
eg: [
{"function": "trigger_clean_reference"},
{"function": "trigger_check_codes"}]
:type triggers: list of dictionaries
Please note that setting the ``aliases``, ``indexes`` or ``primary_key``
replaces the exising aliases or constraints. Setting ``records`` appends
the provided records to the resource.
**Results:**
:returns: The newly created data object, excluding ``records`` passed.
:rtype: dictionary
See :ref:`fields` and :ref:`records` for details on how to lay out records.
datastore_function_delete(context, data_dict)
Delete a trigger function
:param name: function name
:type name: string
datastore_upsert(context, data_dict)
Updates or inserts into a table in the DataStore
The datastore_upsert API action allows you to add or edit records to
an existing DataStore resource. In order for the *upsert* and *update*
methods to work, a unique key has to be defined via the datastore_create
action. The available methods are:
*upsert*
Update if record with same key already exists, otherwise insert.
Requires unique key.
*insert*
Insert only. This method is faster that upsert, but will fail if any
inserted record matches an existing one. Does *not* require a unique
key.
*update*
Update only. An exception will occur if the key that should be updated
does not exist. Requires unique key.
:param resource_id: resource id that the data is going to be stored under.
:type resource_id: string
:param force: set to True to edit a read-only resource
:type force: bool (optional, default: False)
:param records: the data, eg: [{"dob": "2005", "some_stuff": ["a","b"]}]
(optional)
:type records: list of dictionaries
:param method: the method to use to put the data into the datastore.
Possible options are: upsert, insert, update
(optional, default: upsert)
:type method: string
**Results:**
:returns: The modified data object.
:rtype: dictionary
datastore_search_sql(context, data_dict)
Execute SQL queries on the DataStore.
The datastore_search_sql action allows a user to search data in a resource
or connect multiple resources with join expressions. The underlying SQL
engine is the
`PostgreSQL engine <http://www.postgresql.org/docs/9.1/interactive/>`_.
There is an enforced timeout on SQL queries to avoid an unintended DOS.
Queries are only allowed if you have access to the all the CKAN resources
in the query and send the appropriate authorization.
.. note:: This action is not available when
:ref:`ckan.datastore.sqlsearch.enabled` is set to false
.. note:: When source data columns (i.e. CSV) heading names are provdied
in all UPPERCASE you need to double quote them in the SQL select
statement to avoid returning null results.
:param sql: a single SQL select statement
:type sql: string
**Results:**
The result of this action is a dictionary with the following keys:
:rtype: A dictionary with the following keys
:param fields: fields/columns and their extra metadata
:type fields: list of dictionaries
:param records: list of matching results
:type records: list of dictionaries
datastore_run_triggers(context, data_dict)
update each record with trigger
The datastore_run_triggers API action allows you to re-apply exisitng
triggers to an existing DataStore resource.
:param resource_id: resource id that the data is going to be stored under.
:type resource_id: string
**Results:**
:returns: The rowcount in the table.
:rtype: int
datastore_search(context, data_dict)
Search a DataStore resource.
The datastore_search action allows you to search data in a resource.
DataStore resources that belong to private CKAN resource can only be
read by you if you have access to the CKAN resource and send the
appropriate authorization.
:param resource_id: id or alias of the resource to be searched against
:type resource_id: string
:param filters: matching conditions to select, e.g
{"key1": "a", "key2": "b"} (optional)
:type filters: dictionary
:param q: full text query. If it's a string, it'll search on all fields on
each row. If it's a dictionary as {"key1": "a", "key2": "b"},
it'll search on each specific field (optional)
:type q: string or dictionary
:param distinct: return only distinct rows (optional, default: false)
:type distinct: bool
:param plain: treat as plain text query (optional, default: true)
:type plain: bool
:param language: language of the full text query
(optional, default: english)
:type language: string
:param limit: maximum number of rows to return (optional, default: 100)
:type limit: int
:param offset: offset this number of rows (optional)
:type offset: int
:param fields: fields to return
(optional, default: all fields in original order)
:type fields: list or comma separated string
:param sort: comma separated field names with ordering
e.g.: "fieldname1, fieldname2 desc"
:type sort: string
:param include_total: True to return total matching record count
(optional, default: true)
:type include_total: bool
:param records_format: the format for the records return value:
'objects' (default) list of {fieldname1: value1, ...} dicts,
'lists' list of [value1, value2, ...] lists,
'csv' string containing comma-separated values with no header,
'tsv' string containing tab-separated values with no header
:type records_format: controlled list
Setting the ``plain`` flag to false enables the entire PostgreSQL
`full text search query language`_.
A listing of all available resources can be found at the
alias ``_table_metadata``.
.. _full text search query language: http://www.postgresql.org/docs/9.1/static/datatype-textsearch.html#DATATYPE-TSQUERY
If you need to download the full resource, read :ref:`dump`.
**Results:**
The result of this action is a dictionary with the following keys:
:rtype: A dictionary with the following keys
:param fields: fields/columns and their extra metadata
:type fields: list of dictionaries
:param offset: query offset value
:type offset: int
:param limit: query limit value
:type limit: int
:param filters: query filters
:type filters: list of dictionaries
:param total: number of total matching records
:type total: int
:param records: list of matching results
:type records: depends on records_format value passed
datastore_delete(context, data_dict)
Deletes a table or a set of records from the DataStore.
:param resource_id: resource id that the data will be deleted from.
(optional)
:type resource_id: string
:param force: set to True to edit a read-only resource
:type force: bool (optional, default: False)
:param filters: filters to apply before deleting (eg {"name": "fred"}).
If missing delete whole table and all dependent views.
(optional)
:type filters: dictionary
**Results:**
:returns: Original filters sent.
:rtype: dictionary
IConfigurable
IRoutes
IAuthFunctions
root@localhost:/etc/ckan/default/ckanext-basiccharts# lsb_release -a没有可用的 LSB 模块。发行商 ID:Ubuntu 描述:Ubuntu 16.04.6 LTS 版本:16.04 代号:xenial root@localhost:/etc/ckan/default/ckanext-basiccharts# ckan plugin-info
折线图:
实现:IConfigurer IResourceView
统计:
统计插件。实现:IConfigurer IRoutes
图像视图:
这个插件使用标签实现图像资源的视图:IConfigurer IResourceView
斜倚视图:
This extension views resources using a Recline MultiView.
实现:IConfigurer ITemplateHelpers get_dataproxy_url()
Returns the value of the ckan.recline.dataproxy_url config option
get_map_config()
Extracts and returns map view configuration of the reclineview extension.
IResourceView
文本视图:
此扩展预览 JSON(P)。实现:IConfigurer IConfigurable IResourceView
domain_object_mods:
A domain object level interface to change notifications
Triggered by all edits to table and related tables, which we filter
out with check_real_change.
实现:ISession
条形图:
实现:IConfigurer IResourceView
饼形图:
实现:IConfigurer IResourceView
基本网格:
实现: IConfigurer ITemplateHelpers view_data(resource_view) IResourceView
同步搜索:
自动更新搜索索引。实现:IDomainObjectModification