5

python 2.7.11

The script uses pytz, using Pyinstaller it was compiled into an executable. The .exe works fine from my computer; however when opened by someone else they encountered this error:

Traceback <most recent call last>:
File "<string>", line 258, in module
File "<string>", line 20, in init
File "site-packages\pytz_init_.py, line 180, in timezone pytz.exceptions.UnknownTimeZoneError:'US/Pacific'    

The code that's causing the error is:

self.pacific = pytz.timezone('US/Pacific')

The line directly before this is self.UTC = pytz.timezone('UTC') and does not produce and error.

Pyinstaller is equipped to handle Pytz and when it compiled it created a pytz folder which contains the zoneinfo folder with what should be all the necessary files.

Since it worked on my machine (which has pytz installed) and not on their machine (which does not have pytz installed) it's possible it's looking for the zoneinfo in the wrong location, but I'm not sure how to remedy that error.

Tero
  • 81
  • 4

0 Answers0