Is it possible that the datetime module isn't being packaged? Directly importing that module at the top-level of your script might be enough to fix it.

HTH,


Mark

On 2023-09-05 1:46 p.m., Nasser Issa wrote:
Hello There,

Currently been working with PyWin32 to interact with the Event Log and I'm trying to turn my Python script into a Windows executable. I'm using PyInstaller to convert my script into exe, however when I run my exe theĀ  TimeCreated field from the Windows Event is 'None' but when I run the program as a script it works perfectly fine. So, I guess what I'm asking is why does the program work as a python script but not as an executable, I also try adding the DLLs like pywintype310 and few others when building exe with PyInstaller.

Best,
Nas

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to