File "C:/Python34/lib/site-packages/xadmin/sites.py", line 10, in
sys.setdefaultencoding("utf-8")
AttributeError: 'module' object has no attribute 'setdefaultencoding'
这是xadmin插件中sites.py的源代码摘录:
import sys
from functools import update_wrapper
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
from django.views.decorators.cache import never_cache
from imp import reload
reload(sys)
sys.setdefaultencoding("utf-8")
该项目使用python 3.4解释器和Django 1.7.1运行. xadmin的版本是0.5.0
我能做什么 ?
本文由 投稿者 创作,文章地址:https://blog.isoyu.com/archives/python-attributeerrormoduleduixiangmeiyoushu.html
采用知识共享署名4.0 国际许可协议进行许可。除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为:9月 26, 2019 at 12:31 下午