Fix dependencies
See original GitHub issueEach time the oauthlib library is changed, I have to change my code because the behaviour changes. So, can you fix the version of the libraries that you use?
At least you should fix the mayor number of the dependencies since when this number changes, the API often changes.
Issue Analytics
- State:
- Created 9 years ago
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Use apt-get to fix missing and broken packages - Linux Hint
In this article, we will learn how to fix the missing dependencies and broken packages using the apt-get command. Note that, we have...
Read more >How to Fix Unmet Dependencies Error on Ubuntu - Appuals.com
How to Fix Unmet Dependencies Error on Ubuntu · Method 1: Use the -f parameter · Method 2: Use Aptitude · Method 3:...
Read more >Ubuntu fix dependency problems - apt
3 Answers 3 · sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk · Run the following commands in order: sudo apt-get clean sudo apt-get update ...
Read more >How to Find and Fix Broken Packages on Linux - MakeUseOf
Broken packages need repairing or the software won't run. Here's how to find the broken packages and fix them in Linux.
Read more >How to fix npm dependency hell - Sylhare's blog
How to fix npm dependency hell. February 09, 2022. Some context. NodeJS ecosystem is built on top of countless packages that sometime feels...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In case somebody is still facing this issue, you can add os.environ[‘OAUTHLIB_RELAX_TOKEN_SCOPE’] = “1”. I am not sure if this is the best solution, but it was a quick fix which worked for me.
I also encounter
Here’s why it occurs (at least for me):
In oauth2_session.py, fetch_token and refresh_token both call (lines 199 and 257):
self._client.parse_request_body_response(r.text, scope=self.scope)It’s important to note that r.text does not contain details about scope.
Then in, oauthlib/oauth2/rfc6749/parameters.py, the r.text value is passed into a OAuth2Token object (375):
params = OAuth2Token(params, old_scope=scope)The OAuth2Token searches for scope inside params (r.text’s value) but finds none, so assigns self._new_scope to an empty set:
self._new_scope = set(utils.scope_to_list(params.get('scope', '')))validate_token_parameters is then called on the OAuth2Token which is where the trouble occurs:
params.scope_changed compares new_scope to old_scope, and returns true because the old_scope has a value and new_scope doesn’t.
This leads to the warning being raised.
The solution I found was to not pass scope into parse_request_body_response:
self._client.parse_request_body_response(r.text)If you’d like, I can create a pull request.