You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently upgraded my pycsw from 1.10.1 to 2.6.1. After upgrading, however, I am no longer able to load my ISO-19115 XML files into the pycsw database. I am running the pycsw-admin.py command as before:
But this now files fail to ingest all 968 of my ISO-19115 XML files with the same error:
Could not parse "/var/www/html/metadata/iso/ww3_samoa.xml" as an XML record
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pycsw-2.6.1-py3.6.egg/pycsw/core/admin.py", line 348, in load_records
record = metadata.parse_record(context, exml, repo)
File "/usr/local/lib/python3.6/site-packages/pycsw-2.6.1-py3.6.egg/pycsw/core/metadata.py", line 117, in parse_record
return _parse_metadata(context, repos, record)
File "/usr/local/lib/python3.6/site-packages/pycsw-2.6.1-py3.6.egg/pycsw/core/metadata.py", line 142, in _parse_metadata
return [_parse_iso(context, repos, exml)]
File "/usr/local/lib/python3.6/site-packages/pycsw-2.6.1-py3.6.egg/pycsw/core/metadata.py", line 1250, in _parse_iso
_set(context, recobj, 'pycsw:Title', md.identification.title)
**AttributeError: 'list' object has no attribute 'title'**
Here is the URL to our Web-accessible folder (WAF) of ISO-19115 XML files:
Are you able to tell what is causing this error? These same files have all worked successfully for many years using pycsw 1.10.1 Many thanks for your help!
The text was updated successfully, but these errors were encountered:
hi @johnolulu , not sure about that version, but in recent versions md.identification is a list object, so it would require md.identification[0].title, maybe you can pin your owslib to a lower version
Many thanks for the tip, @pvgenuchten! I can confirm that this was the issue.
So, apparently the latest pycsw release (pycsw-2.6.1) is not compatible with the latest OWSLib release (owslib-0.31.0). I needed to downgrade the Python owslib module to owslib-0.28.1 in order for pycsw-2.6.1 to work. As mentioned in the link you provided, the md.identificationinfo container element is no longer recognized in owslib-0.29+, and is instead replaced by md.identification itself, which must then be treated as a list.
It might help others bumping into this same problem to document this as a requirement for pycsw, until it can hopefully be updated to work with the newer OWSLib.
I recently upgraded my pycsw from 1.10.1 to 2.6.1. After upgrading, however, I am no longer able to load my ISO-19115 XML files into the pycsw database. I am running the
pycsw-admin.py
command as before:/usr/share/pycsw/bin/pycsw-admin.py -c load_records -p /var/www/html/metadata/iso/ -f /usr/share/pycsw/default.cfg
But this now files fail to ingest all 968 of my ISO-19115 XML files with the same error:
Here is the URL to our Web-accessible folder (WAF) of ISO-19115 XML files:
https://www.pacioos.hawaii.edu/metadata/iso/
And here is the URL to the specific
ww3_samoa.xml
given in the example above (although all of our files fail with the same error):https://www.pacioos.hawaii.edu/metadata/iso/ww3_samoa.xml
Are you able to tell what is causing this error? These same files have all worked successfully for many years using pycsw 1.10.1 Many thanks for your help!
The text was updated successfully, but these errors were encountered: