我们一直在使用ckanext-dcat从远程的json源中获取数据,有时一些收获作业没有完成,必须与来自该源的所有数据集一起删除,这不是很方便,但一切都回到了正常状态,我不知道是否有一种方法只删除一个作业。
但现在我在“收集消费者日志”中找到了这个:
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 129, in command
gather_callback(consumer, method, header, body)
File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 219, in gather_callback
harvest_object_ids = harvester.gather_stage(job)
File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/harvesters.py", line 186, in gather_stage
content = self._get_content(url, harvest_job, page)
File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/harvesters.py", line 66, in _get_content
cl = r.headers['content-length']
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-length作业完成,但没有创建数据集,如果我删除作业并重新收获,它将继续运行,但永不结束,其他收获作业也不会更新。
我怎么才能解决这个问题?
发布于 2014-10-06 10:22:09
@Urkonn,这里发生了不同的事情:
KeyError: 'content-length':这是由升级到Request2.3引起的。我已经将补丁推到ckanext-dcat来防止这个1,所以请拔出最新版本来获得补丁,并重新启动所有的收获过程。https://stackoverflow.com/questions/26188951
复制相似问题