Error “ValueError: can’t format dates this early” on one PC, works on other

Turns out the issue was in fact trivial and somewhat due to my lack of experience with python and misleading error message.

The COM object raw = win32com.client.Dispatch("MyLib.MyClass") is used to open proprietary files in a loop. To solve the issue one must “clean-up” the object before next iteration. This is done either by

del raw
or
raw = None.

That completely solves the issue. It has absolutely nothing to do with dates or date formating. So Peter Brittain was probably right that this file limit was reached.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)