Closed makkus closed 5 years ago
I was able to fix this issue with https://github.com/neon-ninja/ckan/commit/c93a98127a0f39b8302c8498fa5daa5db6d68e1b
This repository has been inactive for quite some time, the described error has just been fixed with #21.
I'm not sure whether this is an issue with this extension, ckan itself, or the dataset I'm trying to import ( http://researchspace-dev.auckland.ac.nz/oai-dev/request ). Apologies if it is not this extension. The gather stage works well, but I'm getting exceptions like this when fetching:
Traceback (most recent call last): File "/project/ckanext-harvest/ckanext/harvest/harvesters/base.py", line 261, in _create_or_update_package new_package = get_action('package_create_rest')(context, package_dict) File "/project/ckan/ckan/logic/init.py", line 424, in wrapped result = _action(context, data_dict, kw) File "/project/ckan/ckan/logic/action/create.py", line 1115, in package_create_rest dictized_after = _get_action('package_create')(context, dictized_package) File "/project/ckan/ckan/logic/init.py", line 424, in wrapped result = _action(context, data_dict, *_kw) File "/project/ckan/ckan/logic/action/create.py", line 215, in package_create model.repo.commit() File "/usr/lib/ckan/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 107, in commit self.session.commit() File "/usr/lib/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do return getattr(self.registry(), name)(_args, *kwargs) File "/usr/lib/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 768, in commit self.transaction.commit() File "/usr/lib/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 370, in commit self._prepare_impl() File "/usr/lib/ckan/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 339, in _prepare_impl self.session.dispatch.before_commit(self.session) File "/usr/lib/ckan/local/lib/python2.7/site-packages/sqlalchemy/event/attr.py", line 257, in call fn(_args, _kw) File "/project/ckan/ckan/model/extension.py", line 112, in before_commit methodcaller('before_commit', session) File "/project/ckan/ckan/model/extension.py", line 92, in notify_observers func(observer) File "/project/ckan/ckan/model/modification.py", line 35, in before_commit self.notify_observers(session, self.notify) File "/project/ckan/ckan/model/modification.py", line 52, in notify_observers method(obj, domain_object.DomainObjectOperation.new) File "/project/ckan/ckan/model/modification.py", line 84, in notify observer.notify(entity, operation) File "/project/ckan/ckan/lib/search/init.py", line 129, in notify operation File "/project/ckan/ckan/lib/search/init**.py", line 101, in dispatch_by_operation index.insert_dict(entity) File "/project/ckan/ckan/lib/search/index.py", line 78, in insert_dict return self.update_dict(data) File "/project/ckan/ckan/lib/search/index.py", line 103, in update_dict self.index_package(pkg_dict, defer_commit) File "/project/ckan/ckan/lib/search/index.py", line 233, in index_package if date != bogus_date: TypeError: can't compare offset-naive and offset-aware datetimes 2015-07-06 23:21:45,074 DEBUG [ckanext.harvest.harvesters.base] TypeError("can't compare offset-naive and offset-aware datetimes",) 2015-07-06 23:21:45,075 DEBUG [ckanext.oaipmh.harvester] Finished record
Any idea what could be wrong?