[python-win32] Exe not working correctly

Mark Hammond mhammond at skippinet.com.au
Tue Sep 5 14:59:55 EDT 2023


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 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20230905/6cc71e0d/attachment.html>


More information about the python-win32 mailing list