Unknown encoding: idna in Python Requests

后端 未结 1 1475
面向向阳花
面向向阳花 2020-12-20 13:33

I\'m using Python Requests. All works great but today I get this strange error:

[...]
File \"/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/re         


        
相关标签:
1条回答
  • 2020-12-20 14:24

    Try adding:

    import encodings.idna
    

    in various places to sift out other errors. I ran into this same problem working on a port of python to a new platform. We had only partial library support and unicodedata was missing which was causing imports of the idna module to fail. Once we ported unicodedata this error went away.

    0 讨论(0)
提交回复
热议问题