globalwordnet / OMW

The Open Multilingual Wordnet
http://compling.hss.ntu.edu.sg/omw/
MIT License
58 stars 9 forks source link

LoginManager.token_loader removed from flask-login. #17

Open nostneji opened 7 years ago

nostneji commented 7 years ago

When trying to run freshly installed server, several errors will appear:

Traceback (most recent call last): File "__init__.py", line 7, in <module> from flask_login import LoginManager, UserMixin, login_required, login_user, logout_user, current_user, wraps ImportError: cannot import name 'wraps'

and after removing 'wraps' from list

Traceback (most recent call last): File "__init__.py", line 14, in <module> from common_login import * File "/home/jentson/Wrk/omw_env/OMW/omw/common_login.py", line 100, in <module> @login_manager.token_loader AttributeError: 'LoginManager' object has no attribute 'token_loader'

Seems that flask-login has new version which is incompatible with old version (look also https://github.com/maxcountryman/flask-login/blob/master/CHANGES).

fcbond commented 7 years ago

Thanks for pointing this out. Any chance you could propose a solution? Currently we are running it on Ubuntu 16.04.2 LTS, which has an older version of flask and thus no problem, which makes it hard for me to debug.

nostneji commented 7 years ago

Sorry, but I do not have a ready solution for that problem. I am not familiar with flask and flask-login, too.

But I do know how You can reproduce and debug the problem - You can install virtualenv (https://virtualenv.pypa.io/en/stable/installation/) and create 'a sandbox' for new installation of OMW. In that virtual environment You can install all the latest Python packages with PIP and then make the necessary changes. And there was more dependencies than is written into INSTALL description. In my computer the list of dependencies was following:

$ pip freeze
click==6.7
Flask==0.12
Flask-Login==0.4.0
itsdangerous==0.24
Jinja2==2.9.5
lxml==3.7.3
MarkupSafe==1.0
nltk==3.2.2
requests==2.13.0
six==1.10.0
Werkzeug==0.12.1
fcbond commented 7 years ago

Thanks. I think getting it run with a newer flask is a low priority now, but we will definitely keep it in mind (and it is very useful to know more about the dependencies).

On Thu, Mar 30, 2017 at 10:32 AM, nostneji notifications@github.com wrote:

Sorry, but I do not have a ready solution for that problem. I am not familiar with flask and flask-login, too.

But I do know how You can reproduce and debug the problem - You can install virtualenv (https://virtualenv.pypa.io/en/stable/installation/) and create 'a sandbox' for new installation of OMW. In that virtual environment You can install all the latest Python packages with PIP and then make the necessary changes. And there was more dependencies than is written into INSTALL description. In my computer the list of dependencies was following:

$ pip freeze click==6.7 Flask==0.12 Flask-Login==0.4.0 itsdangerous==0.24 Jinja2==2.9.5 lxml==3.7.3 MarkupSafe==1.0 nltk==3.2.2 requests==2.13.0 six==1.10.0 Werkzeug==0.12.1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/globalwordnet/OMW/issues/17#issuecomment-290484127, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD8xnmLwiyF6fy8OBBkr8Nxku4I-tC7ks5rq-dGgaJpZM4Moe2_ .

-- Francis Bond http://www3.ntu.edu.sg/home/fcbond/ Division of Linguistics and Multilingual Studies Nanyang Technological University