Frappe OpenIDConnectAuthCode import error when installed with python3.6 environment.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 66, in application response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 39, in handle validate_oauth()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 134, in validate_oauth from frappe.oauth import get_url_delimiter
File "/home/frappe/frappe-bench/apps/frappe/frappe/oauth.py", line 8, in from oauthlib.oauth2.rfc6749.grant_types import AuthorizationCodeGrant, ImplicitGrant, ResourceOwnerPasswordCredentialsGrant, ClientCredentialsGrant, RefreshTokenGrant, OpenIDConnectAuthCode
ImportError: cannot import name ‘OpenIDConnectAuthCode’
Error pops up even after I tried
pip install --upgrade oauthlib==2.1.0
Error pops up when trying to use pdf function of a print, or on data export ( basically anything that uses any frappe api )
I have not been able to recreate the bug in python2.7 environment.
I am on develop branch with versions
erpnext 11.0.3-beta.34
frappe 11.0.3-beta.48
The error in question is a simple import error, coming from
/frappe-bench/apps/frappe/frappe/api.py
and in it, the function calls
validate_oauth()
validate_auth_via_api_keys()
And the file it is supposed to come from is
/frappe-bench/env/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
Github oauthlib authorization_code.py file link
The error is annoying and can be suppressed by simply commenting out the function calls in
/frappe-bench/apps/frappe/frappe/api.py
#validate_oauth()
#validate_auth_via_api_keys()
But then oauth2 no longer works.
Can anyone replicate this issue ? As I’ve mentioned earlier it pops up in python3.6 env.
Any suggestions are appreciated.
Also, to anyone who will say this should be in the other site, It already is.
I posted it there, post link and after waiting for 24 hours for a reply, and not getting a single view, I am posting it here.
If you need any more data, want me to run some command, whatever, please ask.
though I wont run sudo rm -rf / or sudo chmod -R 777 .* or stuff like that, you know, because my system is already fast enough, thank you.
Also, the two link limit for new users - not a fan.