You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to import module, I am getting following error:
>>> from flask.ext.sentinel import oauth
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'flask.ext'
No module named 'flask.ext'
Also I am trying the following way too and getting different error:
>>> from flask_sentinel import oauth
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_sentinel\__init__.py", line 1, in <module>
from .flask_sentinel import ResourceOwnerPasswordCredentials, oauth # noqa
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_sentinel\flask_sentinel.py", line 11, in <module>
from . import views
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_sentinel\views.py", line 11, in <module>
from .core import oauth
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_sentinel\core.py", line 10, in <module>
from flask_oauthlib.provider import OAuth2Provider
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_oauthlib\provider\__init__.py", line 12, in <module>
from .oauth1 import OAuth1Provider, OAuth1RequestValidator
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_oauthlib\provider\oauth1.py", line 21, in <module>
from ..utils import extract_params, create_response
File "c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\flask_oauthlib\utils.py", line 5, in <module>
from oauthlib.common import to_unicode, bytes_type
ImportError: cannot import name 'bytes_type' from 'oauthlib.common' (c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\oauthlib\common.py)
cannot import name 'bytes_type' from 'oauthlib.common' (c:\users\serhat\desktop\repos\python3-virtual\lib\site-packages\oauthlib\common.py)
The text was updated successfully, but these errors were encountered:
I just spent 2 days trying to get this to work and it was a bit of a pain. You are correct in that flask.ext.whatever has been deprecated. You should use flask_sentinel instead. Then next error is due to a change in the requests-oauthlib package. Lastly if you want to use mongodb you have to downgrade that as well. You also need a redis version < 3 otherwise you will get a 500 error when trying to get a bearer token. Do the following and you'll be able to run it.
I downloaded flask-sentinel by pip like:
When I try to import module, I am getting following error:
Also I am trying the following way too and getting different error:
The text was updated successfully, but these errors were encountered: