SelfhostedPro / selfhosted_templates

Portainer templates for selfhosted services
GNU General Public License v3.0
1.24k stars 238 forks source link

[BUG] Calibre Web #122

Open curator888 opened 4 years ago

curator888 commented 4 years ago

Issuehunt badges

Describe the bug Calibre Web is not actually stand alone requires a database which is normally created by Calibre to work.

To Reproduce Steps to reproduce the behavior: N/A

Expected behavior I think a new user would expect it to "just work". Ideally this could be provided when installing Calibre Web but that might be an issue to implement. If so perhaps it could be made more clear it requires the database to be created first. An initial DB can be downloaded here https://drive.google.com/file/d/189tv5i5SNT6rivLLLvCmC2JeLtODmSS1/view .

Screenshots N/A

Portainer Logs N/A


IssueHunt Summary ### Backers (Total: $2.00) - [curator888 curator888](https://issuehunt.io/u/curator888) ($2.00) #### [Become a backer now!](https://issuehunt.io/r/SelfhostedPro/selfhosted_templates/issues/122) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/SelfhostedPro/selfhosted_templates/issues/122) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/SelfhostedPro/selfhosted_templates/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
SelfhostedPro commented 4 years ago

@nashosted how do you want to go about doing this?

curator888 commented 4 years ago

On investigation this could be solved by using the Linuxserver.io Mod which is in the Github Repo here: https://github.com/linuxserver/docker-mods/blob/master/mod-list.yml

Alternative which bundles Calibre and Calibre Web together (but non official) is here: https://hub.docker.com/r/regueiro/calibre-server

@SelfhostedPro hope this helps

curator888 commented 4 years ago

So ive played with this can got it to see a blank db but now I get a python flask error:

Calibre-Web
Internal Server Error
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 "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database or disk is full
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/calibre-web/cps/web.py", line 243, in inner
return f(*args, **kwargs)
File "/app/calibre-web/cps/admin.py", line 480, in basic_configuration
return _configuration_update_helper()
File "/app/calibre-web/cps/admin.py", line 705, in _configuration_update_helper
config.save()
File "/app/calibre-web/cps/config_sql.py", line 317, in save
self._session.merge(s)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2144, in merge
self._autoflush()
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1628, in _autoflush
util.raise_(e, with_traceback=sys.exc_info()[2])
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1617, in _autoflush
self.flush()
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2523, in flush
self._flush(objects)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2664, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__
exc_value, with_traceback=exc_tb,
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2624, in _flush
flush_context.execute()
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
uow,
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/persistence.py", line 236, in save_obj
update,
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/persistence.py", line 995, in _emit_update_statements
statement, multiparams
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1020, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_clauseelement
distilled_params,
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1324, in _execute_context
e, statement, parameters, cursor, context
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1518, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(sqlite3.OperationalError) database or disk is full
[SQL: UPDATE settings SET config_calibre_dir=? WHERE settings.id = ?]
[parameters: ('/books', 1)]
(Background on this error at: http://sqlalche.me/e/e3q8)
SelfhostedPro commented 4 years ago

(sqlite3.OperationalError) database or disk is full

curator888 commented 4 years ago

@SelfhostedPro Yes it is :(

Still Calibre web needs that blank DB adding to work.

issuehunt-oss[bot] commented 4 years ago

@curator888 has funded $2.00 to this issue.