Note that there are some explanatory texts on larger screens.

plurals
  1. POinstalling pytz in gae is giving UnknownTimeZoneError
    text
    copied!<p><a href="https://stackoverflow.com/users/190597/unutbu">unutbu</a> answered my previous question nicely <a href="https://stackoverflow.com/questions/11925664/what-is-the-local-timezone">here 2</a>, but there does not appear to be a pytz to import directly using my SDK. So I went looking for alternatives and found, for example <a href="https://stackoverflow.com/questions/10843148/importerror-using-pytz-in-google-app-engine">this answer</a> which recommends downloading from <a href="http://pypi.python.org/pypi/gaepytz" rel="nofollow noreferrer">here 4</a>.</p> <p>I placed the following code in my local interactive console.</p> <pre><code>import datetime as dt import pytz utc = pytz.utc western = pytz.timezone('US/Pacific') </code></pre> <p>I put the downloaded directory <code>pytz</code> in my local root directory <code>scheduler</code> and I unzipped the included file <code>scheduler/pytz/zoneinfo.zip</code> and got the following error in the interactive console. I did NOT adjust <code>app.yaml</code> at all; is that correct?</p> <pre><code>"/Users/brian/googleapps/scheduler/pytz/__init__.py", line 173, in timezone raise UnknownTimeZoneError(zone) UnknownTimeZoneError: 'US/Pacific' </code></pre> <p>I also found an answer to a similar error <a href="https://stackoverflow.com/questions/1718724/how-to-properly-add-pytz-to-a-google-app-engine-application">here 5</a> which recommends a patch to the <strong>init</strong>.py file. </p> <p>Now I have found an answer <a href="https://stackoverflow.com/questions/1718724/how-to-properly-add-pytz-to-a-google-app-engine-application">here 6</a> which suggests that errors occur if VERSION 2010h is used instead of VERSION 2011h and the pytz I downloaded is 2010h. What is UP?</p> <p>Is there an easy way to be able to use Wooble's answer with pytz. And does his answer imply I have to upload the <code>pytz</code> directory with my gae app when it is deployed or is there a pytz alread there?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload