Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2012, 03:38 AM   #1
pike2000
Junior Member
pike2000 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2011
Device: PocketBook Pro 903
Possible degradation in 0.8.43 when reading PRC files

After I upgraded Calibre from 0.8.41 to 0.8.43 I see an error while trying to view or convert old PRC files

error: unpack_from requires a buffer of at least 4 bytes

I downloaded these PRC files from WebScriptions (www.baenebooks.com) long time ago. The e-books were either purchased, or taken from Baen's free library.

Note that now it is not possible to download these books as *.prc files, only *.mobi files are available. I have downloaded few of my e-books as *.mobi files and they are viewed/converted fine.

Here is E-book Viewer traceback

calibre, version 0.8.43
ERROR: Could not open ebook: unpack_from requires a buffer of at least 4 bytes

Traceback (most recent call last):
File "site-packages\calibre\gui2\viewer\main.py", line 64, in run
File "threading.py", line 483, in run
File "site-packages\calibre\ebooks\oeb\iterator.py", line 205, in __enter__
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\mobi_in put.py", line 55, in convert
File "site-packages\calibre\ebooks\mobi\reader\mobi6.py", line 105, in __init__
File "site-packages\calibre\ebooks\mobi\reader\headers.py", line 190, in __init__
error: unpack_from requires a buffer of at least 4 bytes

Here is convertor traceback

calibre, version 0.8.43
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Star Flight)

Convert book 1 of 1 (Star Flight)
Resolved conversion options
calibre version: 0.8.43
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 16.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': u'C:\\Users\\xyz\\AppData\\Local\\Temp\\calibre_0. 8.43_tmp_mvf0x1\\gpynra.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'duplicate_links_in_toc': False,
'enable_heuristics': False,
'extra_css': None,
'fb2_genre': u'antique',
'filter_css': u'',
'fix_indents': True,
'font_size_mapping': u'12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0',
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x04A64590>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': True,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'output_profile': <calibre.customize.profiles.IRexDR800Output object at 0x04A64890>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'C:\\Users\\xyz\\AppData\\Local\\Temp\\calibre_0. 8.43_tmp_mvf0x1\\s4lqqf.opf',
'remove_fake_margins': True,
'remove_first_image': True,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'sectionize': u'files',
'series': None,
'series_index': None,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: MOBI Input running
on C:\Users\xyz\AppData\Local\Temp\calibre_0.8.43_tmp _mvf0x1\lljxt0.prc
Unknown codepage 235802126. Assuming cp1252
Unknown codepage 235802126. Assuming cp1252
Python function terminated unexpectedly
unpack_from requires a buffer of at least 4 bytes (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 191, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 963, in run
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\mobi_in put.py", line 55, in convert
File "site-packages\calibre\ebooks\mobi\reader\mobi6.py", line 105, in __init__
File "site-packages\calibre\ebooks\mobi\reader\headers.py", line 190, in __init__
struct.error: unpack_from requires a buffer of at least 4 bytes
pike2000 is offline   Reply With Quote
Old 03-18-2012, 03:50 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Fixed in next release.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-18-2012, 09:25 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
@pike2000

Webscriptions (now Baen ebooks) keeps track of your purchases and ALLOWS you to go back and grab a different format at any time.

NB there are a (very) few titles, where the author has pulled rights
There are also quite a few Previously PAID titles that are now in the free Library
theducks is offline   Reply With Quote
Old 03-21-2012, 08:24 PM   #4
koland
Grand Sorcerer
koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.koland ought to be getting tired of karma fortunes by now.
 
Posts: 8,560
Karma: 8033155
Join Date: Aug 2008
Location: TN, USA
Device: kindle(all), nook, nookcolor, Sony, Kobo, epic, iphone, iPad, pc
I'm seeing same error (x.42), not from Baen books, enough of them it would be a royal pain to have to track them down again.

I'll try to keep an eye out for .44, as I am working on cleaning up my files and fixing the metadata, then ran into a few hundred books that can't be opened (I'm seeing the error in trying to read the books, not just convert - hopefully your fix got both).


calibre, version 0.8.42
ERROR: Could not open ebook: unpack_from requires a buffer of at least 4 bytes

Traceback (most recent call last):
File "site-packages\calibre\gui2\viewer\main.py", line 64, in run
File "threading.py", line 483, in run
File "site-packages\calibre\ebooks\oeb\iterator.py", line 205, in __enter__
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\mobi_in put.py", line 50, in convert
File "site-packages\calibre\ebooks\mobi\reader\mobi6.py", line 105, in __init__
File "site-packages\calibre\ebooks\mobi\reader\headers.py", line 187, in __init__
error: unpack_from requires a buffer of at least 4 bytes

Last edited by koland; 03-21-2012 at 08:27 PM.
koland is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRC files on PB360? poshm PocketBook 2 02-02-2010 09:50 AM
Help with converting PRC files jhempel24 Workshop 15 07-04-2009 09:11 AM
MobiDeDRM for .prc files bringer666 Kindle Formats 17 05-24-2009 05:10 AM
PRC Files Jules Workshop 6 07-29-2008 05:58 PM
problem in reading *.prc(mobipocket) files? bdbob iRex 6 08-08-2007 10:45 PM


All times are GMT -4. The time now is 06:03 PM.


MobileRead.com is a privately owned, operated and funded community.