Reputation: 15
I have configured docker-compose ckan based on the url below.
https://docs.ckan.org/en/2.8/maintaining/installing/install-from-docker-compose.html
There was no problem with datastore when adding ckan plugin.
ckan.plugins = stats text_view image_view recline_view datastore
However, when I added datapusher and pressed the add datasets button, I could see the following screen.
'Internal Server Error'
ckan.plugins = stats text_view image_view recline_view datastore datapusher
# Define which views should be created by default
# (plugins must be loaded in ckan.plugins)
ckan.views.default_views = image_view text_view recline_view
ckan.datapusher.formats = csv xls xlsx tsv application/csv application/vnd.ms-excel application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
I checked the docker-compose logs ckan command and it showed the following output:
2019-12-31 01:52:57,225 ERROR [ckan.config.middleware.flask_app] 'NoneType' object has no attribute 'transaction'
ckan | Traceback (most recent call last):
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
ckan | rv = self.dispatch_request()
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1935, in dispatch_request
ckan | return self.view_functions[rule.endpoint](**req.view_args)
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/views.py", line 89, in view
ckan | return self.dispatch_request(*args, **kwargs)
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/views.py", line 163, in dispatch_request
ckan | return meth(*args, **kwargs)
ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/views/resource.py", line 242, in post
ckan | get_action(u'resource_create')(context, data)
ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/logic/__init__.py", line 469, in wrapped
ckan | result = _action(context, data_dict, **kw)
ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/logic/action/create.py", line 327, in resource_create
ckan | model.repo.commit()
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
ckan | return getattr(self.registry(), name)(*args, **kwargs)
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1027, in commit
ckan | self.transaction.commit()
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 494, in commit
ckan | self._prepare_impl()
ckan | File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 464, in _prepare_impl
ckan | stx = self.session.transaction
ckan | AttributeError: 'NoneType' object has no attribute 'transaction'
ckan | 2019-12-31 01:52:57,341 INFO [ckan.config.middleware.flask_app] /dataset/testdataset07/resource/new render time 3.881 seconds
ckan | 2019-12-31 01:52:57,624 INFO [ckan.config.middleware.flask_app] /api/i18n/en render time 0.001 seconds
ckan | db:5432 - accepting connections
ckan | /usr/lib/ckan/venv/local/lib/python2.7/site-packages/webassets/loaders.py:162: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
ckan | obj = self.yaml.load(f) or {}
ckan | Initialising DB: SUCCESS
ckan | 2019-12-31 01:53:31,960 INFO [ckan.config.environment] Loading static files from public
ckan | /usr/lib/ckan/venv/local/lib/python2.7/site-packages/webassets/loaders.py:162: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
ckan | obj = self.yaml.load(f) or {}
ckan | 2019-12-31 01:53:32,004 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/venv/src/ckan/ckan/templates
this is datapusher log
datapusher | Deleting "8da3ff38-7c78-45ad-bff0-cd84ee76546e" from datastore.
datapusher | Determined headers and types: [{'type': u'text', 'id': u'Region'}, {'type': u'text', 'id': u'Country'}, {'type': u'text', 'id': u'Item Type'}, {'type': u'text', 'id': u'Sales Channel'}, {'type': u'text', 'id': u'Order Priority'}, {'type': u'timestamp', 'id': u'Order Date'}, {'type': u'numeric', 'id': u'Order ID'}, {'type': u'timestamp', 'id': u'Ship Date'}, {'type': u'numeric', 'id': u'Units Sold'}, {'type': u'numeric', 'id': u'Unit Price'}, {'type': u'numeric', 'id': u'Unit Cost'}, {'type': u'numeric', 'id': u'Total Revenue'}, {'type': u'numeric', 'id': u'Total Cost'}, {'type': u'numeric', 'id': u'Total Profit'}]
datapusher | Saving chunk 0
datapusher | Successfully pushed 100 entries to "8da3ff38-7c78-45ad-bff0-cd84ee76546e".
What steps can be taken to reproduce the issue?
Upvotes: 0
Views: 254
Reputation: 15
I solved it by changing it to a stable version.
git checkout tags / ckan-2.8.2
Upvotes: 0