Summary: | [SOLVED] app-text/calibre-0.8.30 fails to retrieve news feeds | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Nichols <gentoo-bugs> |
Component: | New packages | Assignee: | Zac Medico <zmedico> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://www.mobileread.com/forums/showthread.php?p=1882155 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
log downloaded from pastebin
show debug info for "Bad image file" log message calibre debug log for patched 0.8.32 on fetching BBC news |
Description
Thomas Nichols
2011-12-17 04:01:59 UTC
Created attachment 296101 [details]
log downloaded from pastebin
The tail of the attached log:
Cleaning up manifest...
Trimming unused files from manifest...
Creating MOBI Output...
Generating in-line TOC...
Applying case-transforming CSS...
Parsing manglecase.css ...
Parsing tocstyle.css ...
Rasterizing SVG images...
Converting XHTML to Mobipocket markup...
Invalid image: mastheadImage.jpg
Converting TOC for MOBI periodical indexing...
Using mastheadImage supplied in manifest...
Serializing images...
Bad image file 'mastheadImage.jpg'
Traceback (most recent call last):
File "/usr/bin/calibre-parallel", line 19, in <module>
sys.exit(main())
File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 187, in main
result = func(*args, **kwargs)
File "/usr/lib64/calibre/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
plumber.run()
File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1087, in run
self.opts, self.log)
File "/usr/lib64/calibre/calibre/ebooks/mobi/output.py", line 178, in convert
writer(oeb, output_path)
File "/usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py", line 74, in __call__
return self.dump_stream(oeb, stream)
File "/usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py", line 87, in dump_stream
self.generate_content()
File "/usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py", line 96, in generate_content
self.generate_images()
File "/usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py", line 212, in generate_images
raise ValueError('Failed to find masthead image in manifest')
ValueError: Failed to find masthead image in manifest
Created attachment 296155 [details, diff]
show debug info for "Bad image file" log message
If you can reproduce the problem with this patch applied, then hopefully it will produce some more useful debugging info for that "Bad image file" log message. Save as /tmp/debug.patch and apply as follows:
patch /usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py /tmp/debug.patch
Created attachment 297251 [details]
calibre debug log for patched 0.8.32 on fetching BBC news
The output is a little bit out of order due to output buffering quirks. If we put it in order, it will look like this: Rasterizing SVG images... Converting XHTML to Mobipocket markup... Invalid image: mastheadImage.jpg Converting TOC for MOBI periodical indexing... Using mastheadImage supplied in manifest... Serializing images... Traceback (most recent call last): File "/usr/lib64/calibre/calibre/ebooks/mobi/writer2/main.py", line 184, in generate_images data = rescale_image(item.data) File "/usr/lib64/calibre/calibre/ebooks/mobi/utils.py", line 136, in rescale_image data = save_cover_data_to(data, 'img.jpg', return_data=True) File "/usr/lib64/calibre/calibre/utils/magick/draw.py", line 71, in save_cover_data_to img = _data_to_image(data) File "/usr/lib64/calibre/calibre/utils/magick/draw.py", line 20, in _data_to_image img.load(data) File "/usr/lib64/calibre/calibre/utils/magick/__init__.py", line 132, in load return _magick.Image.load(self, data) Exception: no decode delegate for this image format `' @ error/blob.c/BlobToImage/347 Bad image file 'mastheadImage.jpg' If you post the above info to that mobileread forum thread, then Kovid might have an idea about what's going wrong and how to fix it. Ok, applied the patch 296155 (to 0.8.32 install, it applies cleanly) and in the calibre gui log I get the output in 297251: https://bugs.gentoo.org/attachment.cgi?id=297251 FWIW I see that /usr/lib64/calibre/calibre/web/feeds/news.py refers to mastheadImage.jpg, which is not in /usr/share/calibre/ -- other code refers to mastheadImage.gif, which *is* present. $ find /usr/share/calibre/ -name 'masthead*' /usr/share/calibre/catalog/mastheadImage.gif In case it's relevant, I have imagemagick installed, but not pythonmagick -- is that as expected? Thanks, Thomas $ eix -I magick [I] media-gfx/imagemagick Available versions: 6.7.1.0!u ~6.7.4.0!u {X autotrace bzip2 (+)corefonts cxx djvu fftw fontconfig fpx graphviz gs hdri jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png q32 q64 q8 raw static-libs svg tiff truetype video_cards_nvidia webp wmf xml zlib} Installed versions: 6.7.1.0(04:14:48 12/27/11)(X bzip2 corefonts cxx openmp svg truetype xml zlib -autotrace -djvu -fftw -fontconfig -fpx -graphviz -gs -hdri -jbig -jpeg -jpeg2k -lcms -lqr -lzma -opencl -openexr -perl -png -q32 -q64 -q8 -raw -static-libs -tiff -webp -wmf) Homepage: http://www.imagemagick.org/ Description: A collection of tools and libraries for many image formats (In reply to comment #5) > In case it's relevant, I have imagemagick installed, but not pythonmagick -- is > that as expected? You don't need pythonmagick because calibre has a built-in imagemagick binding, which it installs as /usr/lib/calibre/calibre/plugins/magick.so. (In reply to comment #6) > You don't need pythonmagick because calibre has a built-in imagemagick binding, > which it installs as /usr/lib/calibre/calibre/plugins/magick.so. Since this magick.so depends on libMagickWand.so, owned by media-gfx/imagemagick, I'm rebuilding with jpeg support enabled, will update with status. (In reply to comment #7) > (In reply to comment #6) > > > You don't need pythonmagick because calibre has a built-in imagemagick binding, > > which it installs as /usr/lib/calibre/calibre/plugins/magick.so. > > Since this magick.so depends on libMagickWand.so, owned by > media-gfx/imagemagick, I'm rebuilding with jpeg support enabled, will update > with status. Success! Conclusion: need USE=jpeg for media-gfx/imagemagick Thanks, Thomas Okay, I've update the ebuild to require imagemagick[jpeg]. (In reply to comment #9) > Okay, I've update the ebuild to require imagemagick[jpeg]. Thanks! |