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

cannot parse ISO-19115 XML records: 'list' object has no attribute 'title' #1076

Open
johnolulu opened this issue Feb 3, 2025 · 0 comments

Comments

@johnolulu
Copy link

johnolulu commented Feb 3, 2025

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:

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:

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!

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

1 participant