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 when reading book in browser (config problem?) #21

Closed
perler opened this issue Jun 11, 2016 · 6 comments
Closed

error when reading book in browser (config problem?) #21

perler opened this issue Jun 11, 2016 · 6 comments
Labels

Comments

@perler
Copy link

perler commented Jun 11, 2016

when I try to read a book in the browser I get things like below.

It may be a problem in the config.ini (it needs some documentation). I simply filled the db_root = line...

WARNING:tornado.access:404 GET /cover/bookname (1.2.3.4) 8.70ms
ERROR:cps.web:Exception on /read/2853 [GET]
Traceback (most recent call last):
  File "/opt/calibre-web/vendor/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/calibre-web/vendor/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/calibre-web/vendor/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/calibre-web/vendor/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/calibre-web/vendor/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/calibre-web/vendor/flask_login.py", line 717, in decorated_view
    return func(*args, **kwargs)
  File "/opt/calibre-web/cps/web.py", line 507, in read_book
    os.mkdir(newDir)
OSError: [Errno 2] No such file or directory: '/opt/calibre-web/cps/static/2853/OEBPS/images/diagram'
ERROR:tornado.access:500 GET /read/2853 (87.157.53.113) 860.93ms
@janeczku
Copy link
Owner

@perler Need more information. Are you using the Docker image? If not whats the exact command you are using to start the app?

@perler
Copy link
Author

perler commented Jun 17, 2016

no it's debian 7 (kind of, actually openmediavault.org) and the command is:

cd /opt/calibre-web
python /opt/calibre-web/cps.py &

@janeczku
Copy link
Owner

@perler Added a fix in 46c83bb. Please try again with the current HEAD.

@janeczku janeczku added the bug label Jun 17, 2016
@perler
Copy link
Author

perler commented Jun 17, 2016

not yet, but the error is different:

[2016-06-17 20:23:12,177] {/opt/calibre-web/vendor/flask/app.py:1423} ERROR - Exception on /read/2871 [GET]
Traceback (most recent call last):
  File "/opt/calibre-web/vendor/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/calibre-web/vendor/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/calibre-web/vendor/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/calibre-web/vendor/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/calibre-web/vendor/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/calibre-web/vendor/flask_login.py", line 717, in decorated_view
    return func(*args, **kwargs)
  File "/opt/calibre-web/cps/web.py", line 503, in read_book
    zfile = zipfile.ZipFile(os.path.join(config.DB_ROOT, book.path, data.name) + ".epub")
  File "/usr/lib/python2.7/zipfile.py", line 714, in __init__
    self._GetContents()
  File "/usr/lib/python2.7/zipfile.py", line 748, in _GetContents
    self._RealGetContents()
  File "/usr/lib/python2.7/zipfile.py", line 759, in _RealGetContents
    endrec = _EndRecData(fp)
  File "/usr/lib/python2.7/zipfile.py", line 238, in _EndRecData
    endrec = list(struct.unpack(structEndArchive, recData))
error: unpack requires a string argument of length 22

@janeczku
Copy link
Owner

janeczku commented Jun 17, 2016

@perler Does this happen with all your books or just some? Looks like the epub file is corrupted.

@perler
Copy link
Author

perler commented Jun 17, 2016

ah, good question. only with one single book and now even this book doesn't crash the reader. so you can close the issue. (but a lot of books are empty (display nothing) I will open another issue for this.

@perler perler closed this as completed Jun 17, 2016
OzzieIsaacs pushed a commit that referenced this issue May 1, 2021
merge from janeczku/master
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

2 participants