2013-07-23 117 views
0

我使用下列模塊開發中的PyDev一個Django項目(蝕):UnknownTimeZoneError Django的芹菜

Django==1.5.1 
MySQL-python==1.2.4b4 
celery==3.0.21 
django-celery==3.0.17 
pytz==2013b 

我裝芹菜自動化工作,我添加下面的代碼到我的settings.py底部。

import djcelery 
djcelery.setup_loader() 

我還添加了djcelery應用到我的INSTALLED_APPS。當我運行我的服務器時使用:

python manage.py runserver 

我在下面的例外時訪問我的localhost:8000。如果我從settings.py中刪除djcelery代碼,則服務器運行時沒有問題。關於我做錯什麼的想法?

UnknownTimeZoneError at/
'America/Boston' 
Request Method: GET 
Request URL: http://localhost:8000/ 
Django Version: 1.5.1 
Exception Type: UnknownTimeZoneError 
Exception Value:  
'America/Boston' 
Exception Location: C:\Python27\lib\site-packages\pytz\__init__.py in timezone, line 185 
Python Executable: C:\Python27\python.exe 
Python Version: 2.7.5 
Python Path:  
['C:\\Python27\\lib\\site-packages\\oauth2-1.5.211-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\httplib2-0.8-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\pip-1.3.1-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\networkx-1.7-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\numpy-1.7.1-py2.7-win32.egg', 
'C:\\Python27\\lib\\site-packages\\twitter-1.9.4-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\twython-3.0.0-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\requests_oauthlib-0.3.2-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\requests-1.2.3-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\oauthlib-0.5.0-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\simplejson-3.3.0-py2.7.egg', 
'C:\\Python27\\lib\\site-packages\\tweepy-2.1-py2.7.egg', 
'C:\\Windows\\system32\\python27.zip', 
'C:\\Python27\\DLLs', 
'C:\\Python27\\lib', 
'C:\\Python27\\lib\\plat-win', 
'C:\\Python27\\lib\\lib-tk', 
'C:\\Python27', 
'C:\\Python27\\lib\\site-packages'] 
Server time: Mon, 22 Jul 2013 22:50:03 -0400 

回答

0

嘗試TIME_ZONE VAR設置爲無settings.py文件:

TIME_ZONE = None