vendredi 29 mai 2015

Python: "ValueError: can't format dates this early" on one PC, works on other

I have a Python script that works perfectly fine on my Dev PC. Both are Windows 7 with same python version (2.7.9). However on the target machine I get a

ValueError: can't format dates this early

The error seems to come from pywin32 module.

The code uses a 3rd party library invoked by pywin32:

raw = win32com.client.Dispatch("MyLib.MyClass")

and then fails later on:

acq_time = raw.GetCreationDate()

Now I'm lost why this is working on my PC and not on the target machine. Both have a "corporate install" of Windows 7 eg. same Regional and date-time settings.

What is the issue? Can anyone guide me how I might resolve it?

Aucun commentaire:

Enregistrer un commentaire