Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connecting to a csw #972

Open
pvgenuchten opened this issue Feb 18, 2025 · 5 comments
Open

connecting to a csw #972

pvgenuchten opened this issue Feb 18, 2025 · 5 comments

Comments

@pvgenuchten
Copy link
Contributor

pvgenuchten commented Feb 18, 2025

when connecting to this csw
there are 2 observations

  • a query on AnyText throws:
  File "/mnt/c/projects/geopython/lib/python3.10/site-packages/owslib/catalogue/csw2.py", line 390, in getrecords2
    self._invoke()
  File "/mnt/c/projects/geopython/lib/python3.10/site-packages/owslib/catalogue/csw2.py", line 727, in _invoke
    raise ows.ExceptionReport(self._exml, self.owscommon.namespace)
owslib.ows.ExceptionReport: '[Valore del parametro non valido, PropertyName]: locator={1}' 
  • without a filter:
  File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

oh, seems the service is currently down, i hope these requests didn't break it... at least explains the second error.

@geographika
Copy link
Contributor

Trying to access https://servizimoka.regione.emilia-romagna.it/geoportalEsri/csw?service=CSW&version=2.0.2&request=GetCapabilities currently throws Secure Connection Failed errors in both browser and through OWSLib.

If you have a Python snippet that is able to connect and recreate this error, please add here.

@pvgenuchten
Copy link
Contributor Author

yes, the service went down at some point, and didn't come up, else let's close it, if it doesn't come back

@geographika
Copy link
Contributor

@pvgenuchten service is backup so if you are able to provide a failing Python snippet I can debug, fix, and add a test.

@pvgenuchten
Copy link
Contributor Author

from owslib.iso import *
from owslib.etree import etree
from owslib.csw import CatalogueServiceWeb
from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox

url = "https://servizimoka.regione.emilia-romagna.it/geoportalEsri/csw"
csw = CatalogueServiceWeb(url)
constraints = []
constraints.append(PropertyIsEqualTo('csw:AnyText', 'suoli'))
csw.getrecords2(maxrecords=5,outputschema='http://www.isotc211.org/2005/gmd',constraints=constraints,startposition=1,esn='full')
    

@pvgenuchten
Copy link
Contributor Author

probably the csw:anytext is the problematic one, i guess that would be on my side to check capabilities if such a filter exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants