Psycojoker / prosopopee

a static website generator to make beautiful customizable pictures galleries that tell a story
http://prosopopee.readthedocs.org
GNU General Public License v3.0
323 stars 55 forks source link

invalid date field results in traceback #91

Closed jelmer closed 4 years ago

jelmer commented 5 years ago

Typoing the date field results in a somewhat confusing error message:

Traceback (most recent call last):
  File "/home/jelmer/bin/prosopopee", line 10, in <module>
    sys.exit(main())
  File "/home/jelmer/.local/lib/python3.7/site-packages/prosopopee/prosopopee.py", line 629, in main
    galleries=reversed(sorted([x for x in front_page_galleries_cover if x != {}], key=lambda x: x["date"]))
TypeError: '<' not supported between instances of 'str' and 'datetime.date'
Psycojoker commented 5 years ago

Can you provide an example on how to get this error please :)? That would help a lot.

jelmer commented 5 years ago

% cat gallery/settings.yaml title: California date: 2013-07-07 12:12 cover: IMG_20130707_095007_1.jpg light_mode: true

beudbeud commented 5 years ago

only the date, not the hour is supported

jelmer commented 5 years ago

Yup, I understand that - but the error message could be clearer.