geopython / OWSLib

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
https://owslib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
392 stars 278 forks source link

document error handling of etree object #933

Closed pvgenuchten closed 1 month ago

pvgenuchten commented 5 months ago

I was wondering how to retrieve error message from a failed iso19139 parsing

in geohealthcheck i noticed this code

def perform(self):
        try:
            etree.fromstring(
                self.probe.response.content,
                parser=etree.XMLParser(huge_tree=CONFIG['GHC_LARGE_XML']))
        except Exception:
            self.set_result(False, str(sys.exc_info()))

is this the acurate way to retrieve the error message of a failed xml parsing?

If so can we share this approach via documentation?

github-actions[bot] commented 1 month ago

This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

github-actions[bot] commented 1 month ago

This Issue has been closed due to there being no activity for more than 90 days.