Closed lcipriani closed 8 years ago
I'm guessing this is somehow a result of fc4c37c4c31b005853c59e2880a1a82ed9035435. I'll try to look deeper in the coming days
Hi thanks, tomkralidis . I have looked the csw_client.py file, but there is the line:
Yes, this was caused by changing the __init__
mehod params.
@tomkralidis the parent class OwsService
requires an endpoint
param so we need something like:
diff --git a/ckanext/spatial/lib/csw_client.py b/ckanext/spatial/lib/csw_client.py
index a592464..207a0d4 100644
--- a/ckanext/spatial/lib/csw_client.py
+++ b/ckanext/spatial/lib/csw_client.py
@@ -67,8 +67,8 @@ class CswService(OwsService):
"""
from owslib.csw import CatalogueServiceWeb as _Implementation
- def __init__(self):
- super(CswService, self).__init__()
+ def __init__(self, endpoint=None):
+ super(CswService, self).__init__(endpoint)
self.sortby = SortBy([SortProperty('dc:identifier')])
def getrecords(self, qtype=None, keywords=[],
Thanks @amercader. PR issued in #144 144
Thanks! @amercader
Merged, thanks both
It seems that this fix has not been ported to the stable
branch::
https://github.com/ckan/ckanext-spatial/blob/stable/ckanext/spatial/lib/csw_client.py#L70-L71
With csw job i have this error, is a ckan version problem ?
2016-01-22 11:22:58,230 INFO [ckanext.harvest.model] Error contacting the CSW server: init() takes exactly 1 argument (2 given) 2016-01-22 11:22:58,236 ERROR [ckanext.harvest.queue] Gather stage failed
Thanks!