Add book regex crash on published date before 1900
When I try a regex to extract the published date from filename, I get an error if it's before 1900.
You can reproduce this error by going to Add Book configuration and try this regex with that filename.
(?P<published>.+) - (?P<author>[^_]+)
Name of the file:
year - anything.pdf
These gave me errors
1790 - anything.pdf
1791 - anything.pdf
1899 - anything.pdf
But this works well:
1900 - anything.pdf
Details of error:
calibre, version 2.20.0
ERROR: Excepción no considerada: <b>ValueError<
calibre 2.20 isfrozen: True is64bit: False
32bit process running on 64bit windows
('Windows', '7', '6.1.7601')
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
ValueError: year=1790 is before 1900; the datetime strftime() methods require year >= 1900
I've only tried it on Windows 7, but I think it could affect other OS.