我正在运行python-social-auth提供的django 示例,并且收到以下 500 服务器错误。
ImportError at /login/bitbucket/
cannot import name SIGNATURE_HMAC
Request Method: GET
Request URL: http://localhost:8000/login/bitbucket/
Django Version: 1.4.4
Exception Type: ImportError
Exception Value:
cannot import name SIGNATURE_HMAC
Exception Location: /usr/local/lib/python2.7/dist-packages/requests_oauthlib/core.py in <module>, line 3
Python Executable: /usr/bin/python
Python Version: 2.7.3
我在 Google 和 StackOverflow 中搜索并找不到任何答案。我刚刚克隆了它并没有更改任何代码。我安装了 hashlib 和 hmac 库
[编辑] 我升级了 oauthlib 和 requests_oauthlib 并且错误被一个新的替换
AttributeError at /login/bitbucket/
'Request' object has no attribute 'body'
Request Method: GET
Request URL: http://localhost:8000/login/bitbucket/
Django Version: 1.4.4
Exception Type: AttributeError
Exception Value:
'Request' object has no attribute 'body'
Exception Location: /usr/local/lib/python2.7/dist-packages/requests_oauthlib/core.py in __call__, line 46
Python Executable: /usr/bin/python
Python Version: 2.7.3