Skip to content

unexpected error when testing openaire branch #300

@pvgenuchten

Description

@pvgenuchten

when testing the openaire branch, i noticed following error:

pygeometa metadata transform --output-schema iso19139 openaire-handle.json

Error

Import failed: 'NoneType' object is not iterable
Error: No supported input schema detected/found

Firstly, this was not an import, but a transform

Then when I tried:

pygeometa metadata import openaire-handle.json

Although the script still throws the Import failed: 'NoneType' object is not iterable error, the import was actually successfull, which probably means that in the transform case, the conversion to iso19139 (generate) was not successfull, weird that it complains about schema identification. Can we somehow improve the messages/flow?

Corrrect, when I run

pygeometa metadata import -o foo.yml ./openaire-handle.json
pygeometa metadata generate --schema iso19139 foo.yml

The second command throws:

  File "/mnt/c/projects/geopython/pygeometa/pygeometa/schemas/iso19139/main.j2", line 31, in top-level template code
    {% set datestamp = record['metadata']['datestamp']|normalize_datestring %}
  File "/mnt/c/projects/geopython/pygeometa/pygeometa/core.py", line 154, in normalize_datestring
    elif datestring.startswith('$Date'):  # svn Date keyword
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'datestamp'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions