Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in if requests.__version__ < '2.0.0' #373

Open
entchen66 opened this issue Jun 3, 2019 · 2 comments
Open

Error in if requests.__version__ < '2.0.0' #373

entchen66 opened this issue Jun 3, 2019 · 2 comments

Comments

@entchen66
Copy link

Hey there,
anyone ever got an Error like this:

File "/discord_bot/redbot/cogs/Downloader/lib/twitter/api.py", line 31, in <module> from requests_oauthlib import OAuth1, OAuth2 File "/discord_bot/redbot/cogs/Downloader/lib/requests_oauthlib/__init__.py", line 11, in <module> if requests.__version__ < '2.0.0': TypeError: '<' not supported between instances of 'module' and 'str'

I have no clue whats the problem. Maybe someone can help me ;)

entchen66 added a commit to entchen66/requests-oauthlib that referenced this issue Jun 9, 2019
@winedarksea
Copy link

I also saw this same error and managed to resolve it with the following:

python3 -m pip uninstall requests-oauthlib
sudo rm -rf /usr/local/lib/python3.6/dist-packages/requests_oauthlib/
sudo rm -rf /usr/local/lib/python3.6/dist-packages/requests_oauthlib-1.3.0.dist-info/
python3 -m pip install --upgrade pip
python3 -m pip install requests-oauthlib

on Debian/Ubuntu and note that the package version is hard-coded in one line, here 1.3.0

it was a weird error because it appeared to only sporadically occur.

@sakaia
Copy link

sakaia commented Jan 25, 2021

Would you notice me an error effect?it seems requests version check only (2.0.0) and I currently uses 2.23.0.
I am comment out the following code tentatively.

/usr/local/lib/python3.6/dist-packages/requests_oauthlib/__init__.py

#if requests.__version__ < "2.0.0":
#    msg = (
#        "You are using requests version %s, which is older than "
#        "requests-oauthlib expects, please upgrade to 2.0.0 or later."
#    )
#    raise Warning(msg % requests.__version__)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants