django allauth安装迁移

时间:2017-02-02 12:33:40

标签: python django

我用django /建立一个网站 当我安装 django-allauth 时,我在 MIGRATE 步骤

上收到错误

according to this instruction

    D:\prj\cool> python manage.py migrate
   ...........................
      File "D:\Python3\lib\site-packages\openid\yadis\etxrd.py", line 31, in <module>
        SafeElementTree = importSafeElementTree()
      File "D:\Python3\lib\site-packages\openid\oidutil.py", line 83, in importSafeElementTree
        return importElementTree(module_names)
      File "D:\Python3\lib\site-packages\openid\oidutil.py", line 106, in importElementTree
        ElementTree = __import__(mod_name, None, None, ['unused'])
      File "D:\Python3\lib\site-packages\defusedxml\cElementTree.py", line 16, in <module>
        from .ElementTree import DefusedXMLParser, _IterParseIterator
      File "D:\Python3\lib\site-packages\defusedxml\ElementTree.py", line 62, in <module>
        _XMLParser, _iterparse, _IterParseIterator, ParseError = _get_py3_cls()
      File "D:\Python3\lib\site-packages\defusedxml\ElementTree.py", line 56, in _get_py3_cls
        _IterParseIterator = pure_pymod._IterParseIterator
    AttributeError: module 'xml.etree.ElementTree' has no attribute '_IterParseIterator'

有什么想法吗? Python 3.6,django 1.10,django-allauth

1 个答案:

答案 0 :(得分:0)

我从gitHub复制了最后一个补丁的2个文件的新版本 并更新这些文件 - 它的工作原理

https://github.com/tiran/defusedxml/blob/master/defusedxml/common.py https://github.com/tiran/defusedxml/blob/master/defusedxml/ElementTree.py

见上面的评论