internetarchive / internetarchive/epub
problem reading tif.zip imagestack
- Dominant language
- Python
- Stars
- 41
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
In derive:
/epub/convert_iabook.py --epub --document='ofmenandmountain000038mbp' 'ofmenandmountain000038mbp' '/tmp/derive/ofmenandmountain000038mbp/' '/tmp/derive-ofmenandmountain000038mbp-EPUB/tmp.epub' 2>&1
Traceback (most recent call last):
File "/petabox/www/datanode/epub/convert_iabook.py", line 183, in
main(sys.argv[1:])
File "/petabox/www/datanode/epub/convert_iabook.py", line 162, in main
iabook_to_epub.process_book(iabook, ebook)
File "/usr/local/petabox/www/datanode/epub/iabook_to_epub.py", line 183, in process_book
(id, filename) = make_html_page_image(i, iabook, ebook)
File "/usr/local/petabox/www/datanode/epub/iabook_to_epub.py", line 297, in make_html_page_image
'image/jpeg', image, deflate=False)
File "/usr/local/petabox/www/datanode/epub/epub.py", line 131, in add_content
self.add(self.content_dir + href, content_str, deflate)
File "/usr/local/petabox/www/datanode/epub/epub.py", line 201, in add
self.z.writestr(info, content_str)
File "/usr/lib/python2.7/zipfile.py", line 1125, in writestr
zinfo.file_size = len(bytes) # Uncompressed size
TypeError: object of type 'builtin_function_or_method' has no len()
TIFFOpen: /tmp/img_for_epub_dczIsk.tif: Cannot open.
tifftopnm: error opening TIFF file /tmp/img_for_epub_dczIsk.tif
pnmscale: EOF / read error reading magic number
pnmtojpeg: EOF / read error reading magic number
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the documented derive command and read the traceback through convert_iabook.py, iabook_to_epub.py, and epub.py. Inspect the TIFF conversion output and the value passed to zipfile.writestr. Done means the tif.zip imagestack converts into an EPUB without the TypeError or TIFF/PNM/JPEG errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100