Nick Canfield <niftynickto...@gmail.com> added the comment:

I'm having trouble with the .ReceivedTime breaking the program when I compile 
the .py script to an .exe using auto-py-to-exe.

Here's where the error occurs underneath this try: statement

        try:
            received_year = str(email.ReceivedTime)[0:4]
            received_month = str(email.ReceivedTime)[5:7]
            received_day = str(email.ReceivedTime)[8:10]

This works PERFECTLY well inside of my IDE (PyCharm), but once I've compiled it 
to .exe, it breaks here. 

I've updated pywin32 to the most up-to-date version (228) and also tried using 
224 to see if it was a version issue (it wasn't).

BUT!! Going through this, I FOUND THE BUG! When you compile to .exe with 
auto-py-to-exe, it does not include the package "win32timezone" which the 
.ReceivedTime portion needs to run correctly.

All you have to do to fix this is include this at the top of your .py script 
before compiling to .exe:
import win32timezone

Let me know if this works for anyone else facing this issue!

----------
nosy: +Nick Canfield

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34553>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to