-
Notifications
You must be signed in to change notification settings - Fork 278
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
ISO metadata parsing error when MD_FeatureCatalogueDescription uuidref attribute is missing #491
Comments
This is a piece I wrote, I can check and work out a fix in the next couple of days. |
This is good news. Thank you. |
@bchartier Do you maybe have an example you can share of a metadatarecord giving this error? I checked the |
Here is an example of such metadatarecord: It contains this element:
The |
This commit fixes the ISO metadata parsing for records that contain an empty gmd:featureCatalogueCitation element. It also adds tests for ISO metadata parsing as to ensure not to break existing functionality in the future. Tests are added for two ISO metadata records: one from DOV (already existing in the testdata) and one from GéoBretage. Closes issue geopython#491.
This commit fixes the ISO metadata parsing for records that contain an empty gmd:featureCatalogueCitation element. It also adds tests for ISO metadata parsing as to ensure not to break existing functionality in the future. Tests are added for two ISO metadata records: one from DOV (already existing in the testdata) and one from GéoBretage. Closes issue geopython#491.
Fixed by PR #502. |
Thank you. |
I use OWSLib in a tool checking metadata records stored in a CSW catalogue (https://github.com/geobretagne/mdchecker).
When it comes to parse ISO 19139 metadata records containing a gmd:featureCatalogueCitation element with no uuidref attribute an exception is raised by OWSLib (0.16.0):
It seems to me that this attribute is optional as far as ISO 19115 and ISO 19139 are concerned.
OWSLib/iso.py retrieves this attribute this way :
val = i.attrib['uuidref']
(see https://github.com/geopython/OWSLib/blob/master/owslib/iso.py#L965). I would suggest to retrieve it with a get function instead (like there: https://github.com/geopython/OWSLib/blob/master/owslib/iso.py#L723).The text was updated successfully, but these errors were encountered: