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

admin import fails if keyword list contains a None #984

Open
pvgenuchten opened this issue Jul 15, 2024 · 0 comments
Open

admin import fails if keyword list contains a None #984

pvgenuchten opened this issue Jul 15, 2024 · 0 comments
Labels
Milestone

Comments

@pvgenuchten
Copy link
Contributor

pvgenuchten commented Jul 15, 2024

Found this in my logs, when importing some iso records

  File "/harvesters/record-to-pycsw/metadata.py", line 126, in <module>
    record = metadata.parse_record(context, metadata_record, repo)
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 119, in parse_record
    return _parse_metadata(context, repos, record)
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 149, in _parse_metadata
    return [_parse_iso(context, repos, exml)]
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 1429, in _parse_iso
    _set(context, recobj, 'pycsw:Keywords', ','.join([k.name for k in all_keywords]))
TypeError: sequence item 0: expected str instance, NoneType found
Could not parse 33208a53-4973-4516-8f16-5ef82e20fd3b as record, sequence item 0: expected str instance, NoneType found, None

similar for bands

  File "/harvesters/record-to-pycsw/metadata.py", line 126, in <module>
    record = metadata.parse_record(context, metadata_record, repo)
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 119, in parse_record
    return _parse_metadata(context, repos, record)
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 149, in _parse_metadata
    return [_parse_iso(context, repos, exml)]
  File "/harvesters/lib/python3.10/site-packages/pycsw/core/metadata.py", line 1528, in _parse_iso
    for band in ci.bands:
AttributeError: 'MD_FeatureCatalogueDescription' object has no attribute 'bands'
Could not parse 2e0566eb-af7c-493c-abec-81f990c96161 as record, 'MD_FeatureCatalogueDescription' object has no attribute 'bands', None

records.zip

@tomkralidis tomkralidis added this to the 3.0.0 milestone Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants