ckan / ckanext-harvest

Remote harvesting extension for CKAN
130 stars 203 forks source link

Harvest plugin crashes ckan plugin-info command #456

Closed thebe14 closed 2 years ago

thebe14 commented 2 years ago

If I install and enable this plugin (add harvest to the ckan.plugins config file setting, then restart the ckan container), running the command ckan plugin-info will result in a crash.

The plugin is the latest version from the master branch. The ckan installation is also from the latest version from its own master branch (v2.10 afaik), but I had to patch it because of #455 (added back the function render_jinja2).

The output of the command is below:

$ ckan -c ./production.ini plugin-info
2021-09-14 17:46:33,689 INFO  [ckan.cli] Using configuration file /etc/ckan/production.ini
2021-09-14 17:46:33,689 INFO  [ckan.config.environment] Loading static files from public
2021-09-14 17:46:33,742 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/venv/src/ckan/ckan/templates
2021-09-14 17:46:34,145 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/venv/src/ckan/ckan/templates
2021-09-14 17:46:34,233 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2021-09-14 17:46:34,251 DEBUG [ckanext.harvest.model] Harvest tables already exist
...
harvest:
--------
Implements:
Traceback (most recent call last):
  File "/usr/lib/python3.8/inspect.py", line 1135, in getfullargspec
    sig = _signature_from_callable(func,
  File "/usr/lib/python3.8/inspect.py", line 2384, in _signature_from_callable
    raise ValueError(
ValueError: no signature found for builtin type <class 'ckanext.harvest.logic.action.create.InactiveSource'>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/ckan/venv/bin/ckan", line 33, in <module>
    sys.exit(load_entry_point('ckan', 'console_scripts', 'ckan')())
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/ckan/venv/src/ckan/ckan/cli/plugin_info.py", line 46, in plugin_info
    extra = _actions(p[u'class'])
  File "/usr/lib/ckan/venv/src/ckan/ckan/cli/plugin_info.py", line 62, in _actions
    return _function_info(actions)
  File "/usr/lib/ckan/venv/src/ckan/ckan/cli/plugin_info.py", line 71, in _function_info
    args_info = inspect.getargspec(fn)
  File "/usr/lib/python3.8/inspect.py", line 1093, in getargspec
    getfullargspec(func)
  File "/usr/lib/python3.8/inspect.py", line 1144, in getfullargspec
    raise TypeError('unsupported callable') from ex
TypeError: unsupported callable
thebe14 commented 2 years ago

Seems to be the same error reported for CKAN 2.7 in issue #361