janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.04k stars 1.39k forks source link

Internal Server Error at selecting authors-section #974

Closed dirtymurt closed 5 years ago

dirtymurt commented 5 years ago

logged in as admin when i select Authors on left hand side

File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request()
File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e)
File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb)
File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request()
File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, **kwargs)
File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, **kwargs)
File "D:\GIT\calibre-web\cps\web.py", line 656, in author_list .group_by(text('books_authors_link.author')).order_by(db.Authors.sort).all()
File "<string>", line 2, in group_by
File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, *args[1:], **kw)
File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion]))
File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c]
OzzieIsaacs commented 5 years ago

It's working for me. Which version of sqlalchemy do you use? (can be found in the about section), please also post the version of the other linked libraries

OzzieIsaacs commented 5 years ago

Please also post the content of the calibre-web.log file for the time the error occoured. Thanks a lot

dirtymurt commented 5 years ago
Program library Installed Version
iso639 0.4.5
SQLite 3.11.1
SqlAlchemy 1.0.11
Flask 1.1.1
Babel 2.7.0
Flask_Login 0.4.1
pySqlite 2.6.0
Flask_Principal 0.4.0
WebServer Tornado 4.3
pytz 2015.7
Jinja2 2.10.1
Werkzeug 0.15.5
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)]
Requests 2.9.1
lxml not installed
PyPdf v1.26.0
Image Magick not installed
Wand not installed
Pillow not installed
ebook converter ebook-convert.exe (calibre 3.46.0)
dirtymurt commented 5 years ago

Traceback (most recent call last): File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, kwargs) File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, *kwargs) File "D:\GIT\calibre-web\cps\web.py", line 656, in author_list .group_by(text('books_authors_link.author')).order_by(db.Authors.sort).all() File "", line 2, in group_by File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, args[1:], kw) File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion])) File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c] AttributeError: 'TextClause' object has no attribute 'c' [2019-07-24 22:44:30,983] ERROR {cps:1891} Exception on /publisher [GET] Traceback (most recent call last): File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, kwargs) File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, *kwargs) File "D:\GIT\calibre-web\cps\web.py", line 674, in publisher_list .group_by(text('books_publishers_link.publisher')).order_by(db.Publishers.sort).all() File "", line 2, in group_by File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, args[1:], kw) File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion])) File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c] AttributeError: 'TextClause' object has no attribute 'c' [2019-07-24 22:44:44,308] DEBUG {cps.config_sql:253} _ConfigSQL updating storage [2019-07-24 22:44:46,772] DEBUG {cps.config_sql:253} _ConfigSQL updating storage [2019-07-25 10:10:08,977] ERROR {cps:1891} Exception on /author [GET] Traceback (most recent call last): File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, kwargs) File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, *kwargs) File "D:\GIT\calibre-web\cps\web.py", line 656, in author_list .group_by(text('books_authors_link.author')).order_by(db.Authors.sort).all() File "", line 2, in group_by File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, args[1:], kw) File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion])) File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c] AttributeError: 'TextClause' object has no attribute 'c' [2019-07-25 10:22:01,046] ERROR {cps:1891} Exception on /publisher [GET] Traceback (most recent call last): File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, kwargs) File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, *kwargs) File "D:\GIT\calibre-web\cps\web.py", line 674, in publisher_list .group_by(text('books_publishers_link.publisher')).order_by(db.Publishers.sort).all() File "", line 2, in group_by File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, args[1:], kw) File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion])) File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c] AttributeError: 'TextClause' object has no attribute 'c' [2019-07-25 10:22:04,750] ERROR {cps:1891} Exception on /author [GET] Traceback (most recent call last): File "D:\GIT\calibre-web\vendor\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "D:\GIT\calibre-web\vendor\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "D:\GIT\calibre-web\vendor\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "D:\GIT\calibre-web\cps\web.py", line 146, in decorated_view return login_required(func)(*args, kwargs) File "D:\GIT\calibre-web\vendor\flask_login\utils.py", line 261, in decorated_view return func(*args, *kwargs) File "D:\GIT\calibre-web\cps\web.py", line 656, in author_list .group_by(text('books_authors_link.author')).order_by(db.Authors.sort).all() File "", line 2, in group_by File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 201, in generate fn(self, args[1:], kw) File "C:\Python27\lib\site-packages\sqlalchemy\orm\query.py", line 1550, in group_by criterion = list(chain(*[_orm_columns(c) for c in criterion])) File "C:\Python27\lib\site-packages\sqlalchemy\orm\base.py", line 348, in _orm_columns return [c for c in insp.selectable.c] AttributeError: 'TextClause' object has no attribute 'c'

dirtymurt commented 5 years ago

I pulled all the dependencies through as per the instructions btw

OzzieIsaacs commented 5 years ago

the minumun version for sqlalchem is meanwhile 1.1.0, this could be the problem. Could you please try to to upgrade sqlalchemy:

pip install sqlalchemy --upgrade --target vendor

should do the job.

OzzieIsaacs commented 5 years ago

There was an issue (https://github.com/sqlalchemy/sqlalchemy/issues/3706) with this problem at the sqlalchemy repro. I‘m confident that the update will solve the problem

dirtymurt commented 5 years ago

update worked fine, but has not fixed the issue

dirtymurt commented 5 years ago

forgot to mention, in the python window, I'm getting 'no handlers could be found for logger "cps.service"'

not sure if that's relevant

dirtymurt commented 5 years ago

everything works on the left hand side until you get to categories, then same error for everything else

dirtymurt commented 5 years ago

just checked and still reporting

SqlAlchemy 1.0.11
dirtymurt commented 5 years ago

I have updated from python 2x to python 3 and seems to have fixed things