我尝试了以下步骤来设置渠道(https://github.com/hasgeek/funnel):
$ git clone https://github.com/hasgeek/funnel
$ cd funnel/
$ cp instance/settings-sample.py instance/settings.py
$ echo "CACHE_TYPE='simple'" >> instance/development.py
然后我安装了以下内容:
最新的套餐来自:
然后我跑了:
$ python manage.py db create
我得到了以下输出:
Traceback (most recent call last):
File "manage.py", line 5, in <module>
from funnel import app, models, init_for
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/__init__.py", line 35, in <module>
from . import models, forms, views
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/forms/__init__.py", line 3, in <module>
from .comment import *
File "/home/safiyat/Desktop/PyDev/funnel/funnel-master/funnel/forms/comment.py", line 6, in <module>
import wtforms.fields.html5
ImportError: No module named html5
我在某处看到html5小部件和字段是自1.0.5以来内置的wtforms,并且它们应该从wtforms本身导入。虽然我安装的wtforms是1.0.2,但我仍然遇到了这个错误。 为什么?任何解决方案?
答案 0 :(得分:2)
解决了这个问题。
我必须使用命令pip install upgrade wtforms
将我的wtforms升级到1.0.5。
然后使用pip install Flask-Script==0.5.3
将我的Flask-Script从0.6.2降级到0.5.3。
这很有用。