{"action":"created","issue":{"url":"https://api.github.com/repos/janeczku/calibre-web/issues/20","repository_url":"https://api.github.com/repos/janeczku/calibre-web","labels_url":"https://api.github.com/repos/janeczku/calibre-web/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/janeczku/calibre-web/issues/20/comments","events_url":"https://api.github.com/repos/janeczku/calibre-web/issues/20/events","html_url":"https://github.com/janeczku/calibre-web/issues/20","id":156028624,"number":20,"title":"\"No such table\" error when clicking on a book","user":{"login":"jgillman","id":172217,"avatar_url":"https://avatars.githubusercontent.com/u/172217?v=3","gravatar_id":"","url":"https://api.github.com/users/jgillman","html_url":"https://github.com/jgillman","followers_url":"https://api.github.com/users/jgillman/followers","following_url":"https://api.github.com/users/jgillman/following{/other_user}","gists_url":"https://api.github.com/users/jgillman/gists{/gist_id}","starred_url":"https://api.github.com/users/jgillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgillman/subscriptions","organizations_url":"https://api.github.com/users/jgillman/orgs","repos_url":"https://api.github.com/users/jgillman/repos","events_url":"https://api.github.com/users/jgillman/events{/privacy}","received_events_url":"https://api.github.com/users/jgillman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cervinko","id":18114445,"avatar_url":"https://avatars.githubusercontent.com/u/18114445?v=3","gravatar_id":"","url":"https://api.github.com/users/cervinko","html_url":"https://github.com/cervinko","followers_url":"https://api.github.com/users/cervinko/followers","following_url":"https://api.github.com/users/cervinko/following{/other_user}","gists_url":"https://api.github.com/users/cervinko/gists{/gist_id}","starred_url":"https://api.github.com/users/cervinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cervinko/subscriptions","organizations_url":"https://api.github.com/users/cervinko/orgs","repos_url":"https://api.github.com/users/cervinko/repos","events_url":"https://api.github.com/users/cervinko/events{/privacy}","received_events_url":"https://api.github.com/users/cervinko/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-05-20T18:55:17Z","updated_at":"2016-05-24T21:25:34Z","closed_at":null,"body":"After starting calibre-web with `python cps.py` I can navigate around the site and all of the books in my library are properly displayed. If I click on a book I get a 500 error.\r\n\r\nI believe I'm getting the same error in docker, though I'm not getting any traceback output when attaching to the container. The webpage shows the same 500 error.\r\n\r\n**OS:** 64bit Mac OS X 10.11.4 15E65\r\n**Kernel:** x86_64 Darwin 15.4.0\r\n**Calibre:** 2.53\r\n**Python:** 2.7.11\r\n\r\n```\r\nERROR:cps.web:Exception on /book/125 [GET]\r\nTraceback (most recent call last):\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask_login.py\", line 717, in decorated_view\r\n    return func(*args, **kwargs)\r\n  File \"/Users/jgillman/Code/calibre-web/cps/web.py\", line 381, in show_book\r\n    return render_template('detail.html', entry=entries,  cc=cc, title=entries.title, books_shelfs=book_in_shelfs)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/templating.py\", line 128, in render_template\r\n    context, ctx.app)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/flask/templating.py\", line 110, in _render\r\n    rv = template.render(context)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/jinja2/environment.py\", line 969, in render\r\n    return self.environment.handle_exception(exc_info, True)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/jinja2/environment.py\", line 742, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/Users/jgillman/Code/calibre-web/cps/templates/detail.html\", line 1, in top-level template code\r\n    {% extends \"layout.html\" %}\r\n  File \"/Users/jgillman/Code/calibre-web/cps/templates/layout.html\", line 136, in top-level template code\r\n    {% block body %}{% endblock %}\r\n  File \"/Users/jgillman/Code/calibre-web/cps/templates/detail.html\", line 66, in block \"body\"\r\n    {% if entry['custom_column_' ~ c.id]|length > 0 %}\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/jinja2/environment.py\", line 387, in getitem\r\n    return getattr(obj, attr)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/attributes.py\", line 316, in __get__\r\n    return self.impl.get(instance_state(instance), dict_)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/attributes.py\", line 613, in get\r\n    value = self.callable_(state, passive)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/strategies.py\", line 524, in _load_for_state\r\n    return self._emit_lazyload(session, state, ident_key, passive)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/strategies.py\", line 585, in _emit_lazyload\r\n    result = q.all()\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/query.py\", line 2241, in all\r\n    return list(self)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/query.py\", line 2353, in __iter__\r\n    return self._execute_and_instances(context)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/orm/query.py\", line 2368, in _execute_and_instances\r\n    result = conn.execute(querycontext.statement, self._params)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/base.py\", line 662, in execute\r\n    params)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/base.py\", line 761, in _execute_clauseelement\r\n    compiled_sql, distilled_params\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/base.py\", line 874, in _execute_context\r\n    context)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/base.py\", line 1024, in _handle_dbapi_exception\r\n    exc_info\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/util/compat.py\", line 196, in raise_from_cause\r\n    reraise(type(exception), exception, tb=exc_tb)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/base.py\", line 867, in _execute_context\r\n    context)\r\n  File \"/Users/jgillman/Code/calibre-web/vendor/sqlalchemy/engine/default.py\", line 324, in do_execute\r\n    cursor.execute(statement, parameters)\r\nOperationalError: (OperationalError) no such table: books_custom_column_1_link u'SELECT custom_column_1.id AS custom_column_1_id, custom_column_1.value AS custom_column_1_value \\\r\nnFROM custom_column_1, books_custom_column_1_link \\nWHERE ? = books_custom_column_1_link.book AND custom_column_1.id = books_custom_column_1_link.value' (125,)\r\nERROR:tornado.access:500 GET /book/125 (::1) 89.60ms\r\n```"},"comment":{"url":"https://api.github.com/repos/janeczku/calibre-web/issues/comments/221406269","html_url":"https://github.com/janeczku/calibre-web/issues/20#issuecomment-221406269","issue_url":"https://api.github.com/repos/janeczku/calibre-web/issues/20","id":221406269,"user":{"login":"jgillman","id":172217,"avatar_url":"https://avatars.githubusercontent.com/u/172217?v=3","gravatar_id":"","url":"https://api.github.com/users/jgillman","html_url":"https://github.com/jgillman","followers_url":"https://api.github.com/users/jgillman/followers","following_url":"https://api.github.com/users/jgillman/following{/other_user}","gists_url":"https://api.github.com/users/jgillman/gists{/gist_id}","starred_url":"https://api.github.com/users/jgillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgillman/subscriptions","organizations_url":"https://api.github.com/users/jgillman/orgs","repos_url":"https://api.github.com/users/jgillman/repos","events_url":"https://api.github.com/users/jgillman/events{/privacy}","received_events_url":"https://api.github.com/users/jgillman/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T21:25:34Z","updated_at":"2016-05-24T21:25:34Z","body":"@cervinko Ah! I commented too soon. I had apparently created a custom column awhile back called \"formats\" (which appropriately listed the formats each book was available in). I removed the custom column and calibre-web works like a charm now.\r\n\r\nProbably would be good to support (or at least ignore) custom columns. I can't complain though, this UI is 1000x nicer than the built in one!"}}
{"actor":{"display_login":"jgillman"}}