相关疑难解决方法(0)

导入Oauth的错误

我在Windows上使用Python工作相同的代码它工作正常现在它有更新程序的突然更改我发现错误ImportError:无法导入名称to_native_string你能帮助我为什么会出现这个错误.

Traceback (most recent call last):
  File "C:\Users\inla\Desktop\tweepy2\tweepy1.py", line 1, in <module>
    from tweepy import Stream
  File "C:\Users\inla\Desktop\tweepy2\tweepy\__init__.py", line 16, in <module>
    from tweepy.auth import OAuthHandler, AppAuthHandler
  File "C:\Users\inla\Desktop\tweepy2\tweepy\auth.py", line 9, in <module>
    from requests_oauthlib import OAuth1Session, OAuth1
  File "C:\Python27\lib\site-packages\requests_oauthlib-0.4.1-py2.7.egg\requests_oauthlib\__init__.py", line 1, in <module>
    from .oauth1_auth import OAuth1
  File "C:\Python27\lib\site-packages\requests_oauthlib-0.4.1-py2.7.egg\requests_oauthlib\oauth1_auth.py", line 10, in <module>
    from requests.utils import to_native_string
ImportError: cannot import name to_native_string
Run Code Online (Sandbox Code Playgroud)

python windows-7 python-2.7 python-requests

7
推荐指数
1
解决办法
3630
查看次数

标签 统计

python ×1

python-2.7 ×1

python-requests ×1

windows-7 ×1