1

I build a site with django/ When I install django-allauth I get error on MIGRATE step

(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'

Any ideas? Python 3.6, django 1.10, django-allauth

1 Answers1

0

I copied fresh version of 2 files of the last patch from gitHub and updated these files -- and it works

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

see comments above