Skip to content
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

Error after installation on raspberry Pi3b #1902

Closed
Fraggle78 opened this issue Mar 18, 2021 · 15 comments
Closed

Error after installation on raspberry Pi3b #1902

Fraggle78 opened this issue Mar 18, 2021 · 15 comments
Labels

Comments

@Fraggle78
Copy link

Fraggle78 commented Mar 18, 2021

I try to install on an raspberry pi 3 b. I get an error 500:
500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Traceback (most recent call last):
File "/var/www/calibreweb/vendor/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/calibreweb/vendor/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/calibreweb/vendor/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/calibreweb/vendor/flask/_compat.py", line 39, in reraise
raise value
File "/var/www/calibreweb/vendor/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/var/www/calibreweb/vendor/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/var/www/calibreweb/cps/usermanagement.py", line 38, in decorated_view
return login_required(func)(*args, **kwargs)
File "/var/www/calibreweb/vendor/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "/var/www/calibreweb/cps/web.py", line 718, in index
return render_books_list("newest", sort_param, 1, page)
File "/var/www/calibreweb/cps/web.py", line 421, in render_books_list
entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order)
File "/var/www/calibreweb/cps/db.py", line 608, in fill_indexpage
return self.fill_indexpage_with_archived_books(page, pagesize, database, db_filter, order, False, *join)
File "/var/www/calibreweb/cps/db.py", line 622, in fill_indexpage_with_archived_books
.join(*join, isouter=True)
TypeError: join() missing 1 required positional argument: 'target'

@OzzieIsaacs
Copy link
Collaborator

Don‘t use sqlalchemy 1.4.0

@Fraggle78
Copy link
Author

How can i do this? I use YunoHost, where can i change this?

@OzzieIsaacs
Copy link
Collaborator

OzzieIsaacs commented Mar 21, 2021

You should have installed sqlalchemy somehow using pip. So something like:
pip install 'sqlalchemy==1.3.23' --force-reinstall
should do the job. for details I think it would be best if you ask for help at the yunohost repository.

@MohamedElashri
Copy link

You should have installed sqlalchemy somehow using pip. So something like:
pip install 'sqlalachemy==1.3.23' --force-reinstall
should do the job. for details I think it would be best if you ask for help at the yunohost repository.

Trying to do this gives

ERROR: Could not find a version that satisfies the requirement sqlalachemy==1.3.23
ERROR: No matching distribution found for sqlalachemy==1.3.23

@OzzieIsaacs
Copy link
Collaborator

OzzieIsaacs commented Mar 29, 2021

sqlalchemy==1.3.23

sorry misstyping

@MohamedElashri
Copy link

MohamedElashri commented Mar 29, 2021

sqlalchemy==1.3.2

sorry misstyping

it should be
pip install 'SQLAlchemy==1.3.20' --force-reinstall

and I have the same problem.

@OzzieIsaacs
Copy link
Collaborator

Okay: I know nothing about your installation:
So only some guesses:

Using python3 could depending on your distribution (if you are using Linux) have a pip or a pip3 command.

python3 could depending on your distribution (if you are using Linux) also be python or python3 or python3.x (where x could be in the range from 0 to 10).

Depending on your installation you could execute this command as normal user or root user, or some other user running calibre-web (sudo ..., or su)

If you installed calibre-web via "venv" you should (have to) use the python(3(.x)) in the venv folder (or however you have called this virtual environment folder. python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall could work then.

If you installed it "globally" with the vendor folder (the way described in the readme), the problem should not occur but could be solved with python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall --target vendor (from the calibre-web root folder)

If you installed it "globally" without the vendor folder python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall could do it.

Anyhow you have to find out where SQLAlchemy version which is used is installed and exchange it with a version less than 1.4

@OzzieIsaacs
Copy link
Collaborator

By the way: Installing calibre-web in /var/www is from my point of view not an excellent idea (https://serverfault.com/a/96420), /opt would be a better place

@MohamedElashri
Copy link

Okay: I know nothing about your installation:
So only some guesses:

Using python3 could depending on your distribution (if you are using Linux) have a pip or a pip3 command.

python3 could depending on your distribution (if you are using Linux) also be python or python3 or python3.x (where x could be in the range from 0 to 10).

Depending on your installation you could execute this command as normal user or root user, or some other user running calibre-web (sudo ..., or su)

If you installed calibre-web via "venv" you should (have to) use the python(3(.x)) in the venv folder (or however you have called this virtual environment folder. python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall could work then.

If you installed it "globally" with the vendor folder (the way described in the readme), the problem should not occur but could be solved with python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall --target vendor (from the calibre-web root folder)

If you installed it "globally" without the vendor folder python3 -m pip install 'SQLAlchemy==1.3.20' --force-reinstall could do it.

Anyhow you have to find out where SQLAlchemy version which is used is installed and exchange it with a version less than 1.4

Thank you, This solved the problem for me.

@MohamedElashri
Copy link

By the way: Installing calibre-web in /var/www is from my point of view not an excellent idea (https://serverfault.com/a/96420), /opt would be a better place

I agree but for people who are using "Yunohost" like me and the issue author it is standard package place. so they are following a certain conventions that makes things easier to track.

@Krakinou
Copy link
Contributor

Krakinou commented Apr 1, 2021

It seems that this requirement SQLAlchemy-Utils>=0.33.5,<0.37.0 from optionnal-requirement.txt will install sqlalchemy 1.4.4 which then causes the issue.

@OzzieIsaacs
Copy link
Collaborator

This seems to depend on the order of installation. If you install the requirements first, then sqlalchemy is pinned to less than 1.4. sqlalchemy-utils only demands sqlalchemy > 1.0 (https://github.com/kvesteri/sqlalchemy-utils/blob/2e8ee0093f4a33a5c7479bc9aaf16d7863a74a16/setup.py#L83)

Funny enough there are 2 issues in sqlalchmey-utils regarding incompatibility with sqlalchemy version 1.4
(I also stumbled over it, this is why I can't allow sqlalchemy version 1.4 now)
kvesteri/sqlalchemy-utils#507
kvesteri/sqlalchemy-utils#505

@OzzieIsaacs
Copy link
Collaborator

@Krakinou : I had a look at the look your user provides. Looks like the order is as I expected it to be and it's working differently than I thought. I think I need another week to have all my development changes tested and I can merge it back to master. Than calibre-web should work with 1.4 except for the oauth login which requires sqlalchemy-utils.
I have no influence on the speed on which sqlalchemy-utils will publish their fix
(kvesteri/sqlalchemy-utils#506)

@Krakinou
Copy link
Contributor

Krakinou commented Apr 2, 2021

@OzzieIsaacs : No worries, the package does not need sqlaclchemy-utils as it does not use oauth. A typo prevented it to be deleted from optionnal-requirement.txt in my script and installed it by mistake.
Nevertheless, glad we spot this issue if it may help others.

@OzzieIsaacs
Copy link
Collaborator

Meanwhile calibre-web can use sqlalchemy 1.4 without any issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants