我突然无法再启动may django服务器,运行检查:
python manage.py check
显示以下错误:
apps.populate(settings.INSTALLED_APPS)
File "/home/aym/.virtualenvs/prod_env/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/aym/.virtualenvs/prod_env/local/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/aym/workspace/CompanyP/apps/account/models.py", line 18, in <module>
from apps.groups.models import SubscriptionGroup
File "/home/aym/workspace/CompanyP/apps/subscription/models.py", line 8, in <module>
from apps.member.models import Member
File "/home/aym/.virtualenvs/prod_env/local/lib/python2.7/site-packages/bleach/__init__.py", line 5, in <module>
from bleach.linkifier import
File "/home/aym/.virtualenvs/prod_env/local/lib/python2.7/site-packages/bleach/linkifier.py", line 5, in <module>
from html5lib.filters.base import Filter
ImportError: No module named base
你知道吗?
最佳答案
我认为您的html5lib
与bleach
版本不兼容。也许出于某种原因,您拥有最新版本的bleach,但不是最新版本的html5lib。漂白版2.0.0不再支持html5libBackwards incompatible changes
我认为你必须安装最新的html5lib(9s)。
pip install html5lib==0.999999999
关于python - ImportError:html5lib中没有名为base的模块,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42715801/