CKAN 数据推送器错误 500 datapusher.wsgi 无法加载为 python 模块

CKAN datapusher error 500 datapusher.wsgi cannot be loaded as python module

我正在使用 ckan 并想激活数据推送器插件。所以我按照 ckan 页面上的几个步骤进行操作。但是在安装之后我在端口上得到了一个 500 错误并且在日志中得到了这个错误:

 mod_wsgi (pid=536): Target WSGI script '/etc/ckan/datapusher.wsgi' cannot be loaded as Python module.
 mod_wsgi (pid=536): Exception occurred processing WSGI script '/etc/ckan/datapusher.wsgi'.
 Traceback (most recent call last):
 File "/etc/ckan/datapusher.wsgi", line 10, in <module>
 web.init()
 AttributeError: 'module' object has no attribute 'init'

所以这似乎是 datapusher.wsgi 的问题 但是由于我对 python 和 apache 的了解很少,我无法解决这个问题。

是否有人遇到过此问题并找到了解决方法或知道如何解决?

我安装的时候遇到了同样的问题。在我的例子中是因为 requirements.txt 第一次没有正确安装。

我还建议检查 /etc/apache2/sites-available/datapusher 中的配置,顺便看看 /var/log/apache2/datapusher。error.log 是否提供更多线索。

请确保您在 .ini 文件中也添加了 datapusher (ckan.datapusher.url 和 ckan.site_url) 的配置。

希望对你有所帮助:)