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


i have python script works fine on development pc. both windows 7 same python version (2.7.9). on target machine a

valueerror: can't format dates early

the error seems come pywin32 module.

the code uses third-party library invoked pywin32:

raw = win32com.client.dispatch("mylib.myclass") 

and fails later on:

acq_time = raw.getcreationdate() 

now i'm lost why working on pc , not on target machine. both have "corporate install" of windows 7, example, same regional , date-time settings.

what issue? how might resolve it?

edit:

see comments. cause c++ runtime used. i'm still investigating. suspect matters runtimes present @ install time of pywin32. why? because dependenywalker on development pc says pywin depends on msvcr90.dll in lotus notes installation. tells me sure isn't "hard" linked.

update 30.06.2015:

i wrong...the issue happens on pc.

some further info. script reads data files , inserts read meta-data database. older files seemed affected bug, not new ones (i think assumption wrong). idea to initial load on dev pc , hope issue never occur again new files.

in case of pc script run, files reads on windows shared drive (mapped network drive). don't have access drive copied files pc. doing initial load requested access said network drive , boom. not work dev. machine when reading shared drive.

the issue not happen same file. think has nothing specific file. tried on 64-bit pc 64-bit python. there took longer till error occurred. in fact file read failed on pc. think kind of memory issue? believe fails on date line because other lines return null or empty string causes no problem , entirely possible such value can null. date problem , should not null , error thrown.

edit of update:

on pc fails on same file. loading file alone works fine. think it's kind of counter/number overflow after reading n files, issue occurs. has amount of files load per run of script , not file itself. files fail work when loading them individually.

turns out issue in fact trivial , due lack of experience python , misleading error message.

the com object raw = win32com.client.dispatch("mylib.myclass") used open proprietary files in loop. solve issue 1 must "clean-up" object before next iteration. done either

del raw or raw = none.

that solves issue. has absolutely nothing dates or date formating. peter brittain right file limit reached.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -