Comments (9)
I can reproduce the error by downloading after using the newest version of flask-login:
ERROR:cps.web:Exception on / [GET]
Traceback (most recent call last):
File "C:\calibre-web\vendor\flask\app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "C:\calibre-web\vendor\flask\app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\calibre-web\vendor\flask\app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\calibre-web\vendor\flask\app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "C:\calibre-web\vendor\flask\app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "C:/calibre-web\cps\web.py", line 541, in index
return render_template('index.html', random=random, entries=entries, pagination=pagination, title=_(u"Latest Books"))
File "C:\calibre-web\vendor\flask\templating.py", line 128, in render_template
context, ctx.app)
File "C:\calibre-web\vendor\flask\templating.py", line 110, in _render
rv = template.render(context)
File "C:\calibre-web\vendor\jinja2\environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "C:\calibre-web\vendor\jinja2\environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\calibre-web\cps\templates\index.html", line 1, in top-level template code
{% extends "layout.html" %}
File "C:\calibre-web\cps\templates\layout.html", line 54, in top-level template code
{% if g.user.is_authenticated() or g.user.is_anonymous() %}
AttributeError: 'bool' object has no attribute 'call'
ERROR:tornado.access:500 GET / (127.0.0.1) 505.00ms
I try to look after it tomorrow.
from calibre-web.
Do you get this error when you are logged in to calibre-web or only as anonymous user?
Do you have flask-login installed on your system. if yes what version.
this could be related to miguelgrinberg/flasky#74 but this is just a first guess.
from calibre-web.
Sorry for the delay, for some reason I was expecting an email notification.
My error appears when using it as an anonymous user. I just changed the settings, and then the error is more similar to the one you pointed (TypeError: 'bool' object is not callable). The only way I've managed to enter my library is following this method: 1) enter http://url:port/feed. 2) enter login and password 3) enter http:/url:port. If I enter the library directly, I still got the same error.
I didn't have flask-login installed in my system. I just installed it via apt-get and got the 0.2.6-1 version. The problem still persists.
Edit: I also tried installing python-flask-login 0.32 (the latest one) using an Ubuntu deb. The problem still persists.
from calibre-web.
i remember an issue like this, caused by anonymous users. I fixed it, i can take a look at it later. Could you please try to switch anon user off and try it with activated user management
from calibre-web.
Yes. I'm currently using calibre-web with anon disabled.
Btw, just for the sake of completeness, this is the error message I get when anon user is disabled (in config.ini):
root@host:~/calibre-web-biblio# python cps.py
ERROR:cps.web:Exception on /login [GET]
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/root/calibre-web-psico/cps/web.py", line 625, in login
if current_user is not None and current_user.is_authenticated():
TypeError: 'bool' object is not callable
ERROR:tornado.access:500 GET /login?next=%2F (188.xxx.xxx.xxx) 5.56ms
Notice how, in the browser, I'm being redirected to http://host:port/login?next=%2F
from calibre-web.
if this error only occurs with flask-login > 0.3.0 then everything is clear. flask-login changed is_authenticated to a property in UserMixin.
I think we should vendor the latest flask-login and adjust our code to it.
from calibre-web.
i can only reproduce it with a new flask-login version, otherwise it works for me
from calibre-web.
One temporary solution is downgrading the flask-login version.
pip uninstall flask-login
(or apt-get remove python-flask-login
if installed via apt-get)
pip install flask-login==0.2.11
I tried it and it works.
from calibre-web.
Updated flask-login
from calibre-web.
Related Issues (20)
- Epubs become corrupted during upload HOT 1
- Read in Browser -- doesn't load the embed font in epub!!! HOT 3
- Need assistance setting up Gmail oAuth HOT 1
- Thank You HOT 1
- Following current reading
- Bug in Caliblur dark theme HOT 2
- Leading spaces are not being trimed on the Publisher & Identifiers field. HOT 3
- Incorrect tags on LubimyCzytac
- Kobo Sync token contents do not follow the expected json schema HOT 1
- Calibre web not working anymore (internal server error) HOT 7
- Using "count()" to determine the total number in `Pagination` HOT 1
- Error calibre-web HOT 2
- docker channel spam attack HOT 1
- Error uploading with ASCII metadatas on PDF HOT 1
- Multiple kindle emails per calibre-web account HOT 2
- Clicking "Books" results in different books listed for different users HOT 1
- FEAT: Add upload from url (instead of from disk) option
- calibre-web app on asus nas HOT 1
- CALIBRE does not convert from EBOOK to PDF (ver 7.7, 64, Calibre ebook management, Windows 11, 64) HOT 4
- Issue setting up gmail in Docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calibre-web.