0

Flask Megaチュートリアルに従っています。flask.ext.wtf.form のインポート中にインポート エラーが発生しました。私のコードは -

from flask.ext.wtf.form import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired

class LoginForm(Form):
      openid = StringField('openid', validators=[DataRequired()])
      remember_me = BooleanField('remember_me', default=False)

私は仮想環境を使用しており、すでに仮想環境にフラスコ、フラスコ-wtfをインストールしています私のフラスコ-wtfのバージョンは0.12ですここに私のエラーがあります-

Traceback (most recent call last):
File "E:/Projects/microblog/app/__init__.py", line 6, in <module>
from app import views
File "E:\Projects\microblog\app\__init__.py", line 6, in <module>
from app import views
File "E:\Projects\microblog\app\views.py", line 3, in <module>
from .forms import LoginForm
File "E:\Projects\microblog\app\forms.py", line 1, in <module>
from flask.ext.wtf.form import Form
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in    _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
File "E:\Python\env\lib\site-packages\flask\exthook.py", line 62, in     load_module
__import__(realname)
File "E:\Python\env\lib\site-packages\flask_wtf\__init__.py", line 15, in <module>
from .form import Form
File "E:\Python\env\lib\site-packages\flask_wtf\form.py", line 15, in <module>
from .i18n import translations
File "E:\Python\env\lib\site-packages\flask_wtf\i18n.py", line 12, in <module>
from flask_babel import get_locale
File "E:\Python\env\lib\site-packages\flask_babel\__init__.py", line   21,  in <module>
from babel import dates, numbers, support, Locale
File "E:\Python\env\lib\site-packages\babel\dates.py", line 28, in <module>
from babel.util import UTC, LOCALTZ
File "E:\Python\env\lib\site-packages\babel\util.py", line 278, in <module>
from babel import localtime
File "E:\Python\env\lib\site-packages\babel\localtime\__init__.py", line 21, in <module>
from babel.localtime._win32 import _get_localzone
File "E:\Python\env\lib\site-packages\babel\localtime\_win32.py", line 18, in <module>
tz_names = get_global('windows_zone_mapping')
File "E:\Python\env\lib\site-packages\babel\core.py", line 58, in get_global
_global_data = pickle.load(fileobj)
TypeError: an integer is required (got type str)
4

1 に答える 1