View Single Post
Old 08-18-2019, 09:55 AM   #1
halfbeep
Junior Member
halfbeep began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2019
Device: calibre web content server
web content server cover.jpg error

I can convert, upload ebooks that appear to pass all checks and run all okay in local ebook reader and 3rd party book readers. The 'cover.jpg's are in the correct location outside the epub. I have tried formats png and jpg

When browsing the content server my cover image for any book shows as a broken image in the browser. Server log reports this error:-

Unhandled exception in state: State: _job_done Client: 81.98.188.151:59964 Request: GET /get/thumb/2/Past_Papers?sz=600x800 HTTP/1.1
Traceback (most recent call last):
File "/root/calibre/src/calibre/srv/loop.py", line 569, in tick
conn.handle_event(event)
File "/root/calibre/src/calibre/srv/loop.py", line 308, in _job_done
self.job_done(*event)
File "/root/calibre/src/calibre/srv/http_response.py", line 495, in job_done
reraise(etype, e, tb)
File "/root/calibre/src/calibre/srv/pool.py", line 35, in run
result = func()
File "/root/calibre/src/calibre/srv/http_response.py", line 452, in run_request_handler
result = self.request_handler(data)
File "/root/calibre/src/calibre/srv/routes.py", line 317, in dispatch
ans = endpoint_(self.ctx, data, *args)
File "/root/calibre/src/calibre/srv/content.py", line 326, in get
return cover(ctx, rd, library_id, db, book_id, width=w, height=h)
File "/root/calibre/src/calibre/srv/content.py", line 156, in cover
return create_file_copy(ctx, rd, prefix, library_id, book_id, 'jpg', mtime, copy_func)
File "/root/calibre/src/calibre/srv/content.py", line 98, in create_file_copy
copy_func(ans)
File "/root/calibre/src/calibre/srv/content.py", line 154, in copy_func
data = scale_image(buf.getvalue(), width=width, height=height, compression_quality=quality)[-1]
File "/root/calibre/src/calibre/utils/img.py", line 374, in scale_image
img = image_from_data(data)
File "/root/calibre/src/calibre/utils/img.py", line 88, in image_from_data
raise NotImage('Not a valid image (detected type: {})'.format(q))
NotImage: Not a valid image (detected type: None)

Has anyone else seen this issue? The cover.jpg image is not being found or interpreted correctly. If I delete the cover.jpg file, the error persists same

Any help appreciated. Thx
halfbeep is offline   Reply With Quote