ckan / datapusher

A standalone web service that pushes data files from a CKAN site resources into its DataStore
GNU Affero General Public License v3.0
77 stars 153 forks source link

Error 500: has no attribute 'asynchronous' #190

Open MichaelHarmsTIB opened 4 years ago

MichaelHarmsTIB commented 4 years ago

Hi guys,

I got an error after installing datapusher on apache2.4. Here my config: apache conf sites-available: `<VirtualHost 0.0.0.0:8800> ServerName ckan

# this is our app
WSGIScriptAlias / /etc/ckan/datapusher.wsgi

# pass authorization info on (needed for rest api)
WSGIPassAuthorization On

# Deploy as a daemon (avoids conflicts between CKAN instances)
WSGIDaemonProcess datapusher display-name=datapusher processes=1 threads=15

WSGIProcessGroup datapusher

ErrorLog /var/log/apache2/datapusher.error.log
CustomLog /var/log/apache2/datapusher.custom.log combined

 <Directory "/">
    Require all granted
 </Directory>

` Port-conf:

`Listen 8080

Listen 443 Listen 443

NameVirtualHost *:8800 Listen 8800 `

WSGI: `import os import sys import hashlib

activate_this = os.path.join('/usr/lib/ckan/datapusher/bin/activate_this.py') with open(activate_this) as fp: exec(fp.read(), dict(file=activate_this))

import ckanserviceprovider.web as web os.environ['JOB_CONFIG'] = '/etc/ckan/datapusher_settings.py' web.init()

import datapusher.jobs as jobs

application = web.app **Datapusher-settings:** import uuid

DEBUG = False TESTING = False SECRET_KEY = str(uuid.uuid4()) USERNAME = str(uuid.uuid4()) PASSWORD = str(uuid.uuid4())

NAME = 'datapusher'

database

SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/job_store.db'

webserver host and port

HOST = '0.0.0.0' PORT = 8800

logging

FROM_EMAIL = 'server-error@example.com'

ADMINS = ['yourname@example.com'] # where to send emails

LOG_FILE = '/tmp/ckan_service.log'

STDERR = True ` Error-Log:

[Thu May 28 18:13:36.866533 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] mod_wsgi (pid=29779): Failed to exec Python script file '/etc/ckan/datapusher.wsgi'. [Thu May 28 18:13:36.866558 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] mod_wsgi (pid=29779): Exception occurred processing WSGI script '/etc/ckan/datapusher.wsgi'. [Thu May 28 18:13:36.866572 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] Traceback (most recent call last): [Thu May 28 18:13:36.866593 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] File "/etc/ckan/datapusher.wsgi", line 13, in <module> [Thu May 28 18:13:36.866612 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] import datapusher.jobs as jobs [Thu May 28 18:13:36.866618 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] File "/home/ckan/datapusher/datapusher/jobs.py", line 308, in <module> [Thu May 28 18:13:36.866627 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] @job.asynchronous [Thu May 28 18:13:36.866639 2020] [wsgi:error] [pid 29779:tid 140510996969216] [remote ::1:42222] AttributeError: 'module' object has no attribute 'asynchronous' [Thu May 28 18:13:50.338286 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] mod_wsgi (pid=29779): Failed to exec Python script file '/etc/ckan/datapusher.wsgi'. [Thu May 28 18:13:50.338309 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] mod_wsgi (pid=29779): Exception occurred processing WSGI script '/etc/ckan/datapusher.wsgi'. [Thu May 28 18:13:50.338326 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] Traceback (most recent call last): [Thu May 28 18:13:50.338341 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] File "/etc/ckan/datapusher.wsgi", line 13, in <module> [Thu May 28 18:13:50.338363 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] import datapusher.jobs as jobs [Thu May 28 18:13:50.338370 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] File "/home/ckan/datapusher/datapusher/jobs.py", line 308, in <module> [Thu May 28 18:13:50.338380 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] @job.asynchronous [Thu May 28 18:13:50.338394 2020] [wsgi:error] [pid 29779:tid 140510887864064] [remote ::1:42224] AttributeError: 'module' object has no attribute 'asynchronous'