-
Notifications
You must be signed in to change notification settings - Fork 259
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
'module' object has no attribute 'oauth2' #98
Comments
Which version of Django are you using? 1.7? |
I'm having the same error, I confirm be using Django 1.7 (with Python 3.4 too) |
I think this is running into this Django issue, and according to this comment, the documentation on It looks like PR #93 is going to fix this in commit 4a5ba08. Hopefully CaffeineHit wakes up and merges the PR soon. |
Is there a work around for this? |
CaffeineHit appears to be completely dead, so this repository is no longer being updated. So no, there is no workaround for this. If you can switch to a different OAuth 2 provider, you can use Django Oauth Toolkit. There are forks that are still developed - I suggest either @mapmyfitness's fork or @glassresistor's fork. |
I have the same issue and i not use Django |
@dbritos: If you're sure you're not using Django, you may get that error if you are trying to use the python-oauth2 library instead, since there is an unfortunate module name collision between that project and this one. |
First of all. Thank you! This app would be very helpful if I could manage to make it work.
I try to add OAuth2 authentication scheme to Django rest framework. I'm following the documentation: http://www.django-rest-framework.org/api-guide/authentication It states that 'provider.oauth2' shall be added to INSTALLED_APPS. However, if I do that I keep getting the same error:
Traceback (most recent call last):
File "/Users/user/s/lib/python3.4/site-packages/django/apps/config.py", line 114, in create
cls = getattr(mod, cls_name)
AttributeError: 'module' object has no attribute 'oauth2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/user/PycharmProjects/s/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/Users/user/s/lib/python3.4/site-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/Users/user/s/lib/python3.4/site-packages/django/core/management/init.py", line 354, in execute
django.setup()
File "/Users/user/s/lib/python3.4/site-packages/django/init.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/user/s/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/user/s/lib/python3.4/site-packages/django/apps/config.py", line 120, in create
"cannot import name '%s' from '%s'" % (cls_name, mod_path))
ImportError: cannot import name 'oauth2' from 'provider'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: