Skip to content

Datapusher error when root_path is set #2866

@AdrianMBarrera

Description

@AdrianMBarrera

Hi,

After setting root_path variable in CKAN config file, Datapusher no longer works. We always get:

Error: Process completed but unable to post to result_url 

Contents of datapusher.error.log:

[Fri Feb 05 09:20:00.905675 2016] [:error] [pid 5997:tid 140341959157632] Exception AttributeError: "'NoneType' object has no attribute 'Error'" in <generator object raw at 0x7fa3d9384410> ignored
[Fri Feb 05 11:16:52.104411 2016] [:error] [pid 1502:tid 140224457529088] /usr/lib/ckan/datapusher/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value 'ca8c86c6-ca87-4b36-b6bb-3...'. (this warning may be suppressed after 10 occurrences)
[Fri Feb 05 11:16:52.119255 2016] [:error] [pid 1502:tid 140224457529088]   (util.ellipses_string(value),))
[Fri Feb 05 11:16:57.624008 2016] [:error] [pid 1502:tid 140224457529088] Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
[Fri Feb 05 11:16:57.624065 2016] [:error] [pid 1502:tid 140224457529088] Traceback (most recent call last):
[Fri Feb 05 11:16:57.624096 2016] [:error] [pid 1502:tid 140224457529088]   File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/apscheduler/scheduler.py", line 512, in _run_job
[Fri Feb 05 11:16:57.624106 2016] [:error] [pid 1502:tid 140224457529088]     retval = job.func(*job.args, **job.kwargs)
[Fri Feb 05 11:16:57.624116 2016] [:error] [pid 1502:tid 140224457529088]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 287, in push_to_datastore
[Fri Feb 05 11:16:57.624125 2016] [:error] [pid 1502:tid 140224457529088]     resource = get_resource(resource_id, ckan_url, api_key)
[Fri Feb 05 11:16:57.624134 2016] [:error] [pid 1502:tid 140224457529088]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 233, in get_resource
[Fri Feb 05 11:16:57.624143 2016] [:error] [pid 1502:tid 140224457529088]     check_response(r, url, 'CKAN')
[Fri Feb 05 11:16:57.624151 2016] [:error] [pid 1502:tid 140224457529088]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 144, in check_response
[Fri Feb 05 11:16:57.624160 2016] [:error] [pid 1502:tid 140224457529088]     response=response.text)
[Fri Feb 05 11:16:57.624168 2016] [:error] [pid 1502:tid 140224457529088] HTTPError

If we don't use the root_path variable and set our subpath in site_url then Datapusher works again but some CKAN extensions like archiver/qa get broken as they need the root_path variable to get the subpath.

We think this is related to #2599

Any help to fix this would be appreciated. Thank you in advance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions