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

Type mismatch for date field #1

Open
markphilpot opened this issue Nov 25, 2017 · 3 comments
Open

Type mismatch for date field #1

markphilpot opened this issue Nov 25, 2017 · 3 comments

Comments

@markphilpot
Copy link

pelican.utils.get_date and the parser in general expects a string for the date field, but the frontmark reader returns a datetime.datetime object instead, ultimately causing a TypeError.

See METADATA_PROCESSORS in pelican.readers.py

@markphilpot
Copy link
Author

This also happens if PyYaml interprets a field as a timestamp (like slug for example) where pelican's metadata processing assume it's going to receive a string...

@jlirochon
Copy link

As an example, if you set date: 2020-02-09T18:43:33.227Z in metadata, it will crash.

@jlirochon
Copy link

A workaround can be found here : jlirochon@e778136

Works for me, hope it can help someone.

Let me know if you want a PR or if it feels too hacky.

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

2 participants