View Single Post
Old 06-06-2010, 10:14 PM   #1
sglinert
Enthusiast
sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.sglinert ought to be getting tired of karma fortunes by now.
 
Posts: 49
Karma: 1024532
Join Date: May 2008
Device: iPad Air, iPod Touch 5, Illudium Q-42 Explosive Space Modulator
Can't convert RTF files

I have about 4000 fanfiction books in rtf format, and I can't get any of them to convert to ePub. Well, I should say that I tried a random sample of 50 books, and I get the same error code each time.

Here is the error info.
_______________
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Abandoned)

Convert book 1 of 1 (Abandoned)
Resolved conversion options
calibre version: 0.7.1
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': None,
'debug_pipeline': None,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'extra_css': None,
'extract_to': None,
'flow_size': 1640,
'font_size_mapping': None,
'footer_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'header_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x039E9A90>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'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,
'max_toc_links': 50,
'no_chapters_in_toc': True,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.OutputProfile object at 0x039E9C70>,
'page_breaks_before': u'/',
'prefer_metadata_cover': False,
'preprocess_html': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\docume~1\\susans~1\\locals~1\\temp\\calibre_0 .7.1_9tsgul.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'series': None,
'series_index': None,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: RTF Input running
on E:\E-Books\EBook Library\Harry Potter Fanfiction\Abandoned (4304)\Abandoned - Harry Potter Fanfiction.rtf
Converting RTF to XML...
Preprocessing to convert unicode characters
line: 1 has bad encoding
File "preprocessed.rtf" does not appear to be RTF.
Python function terminated unexpectedly
'ascii' codec can't decode byte 0xe7 in position 490: ordinal not in range(128)Invalid RTF: File not ascii encoded.
(Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 99, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 808, in run
File "site-packages\calibre\customize\conversion.py", line 211, in __call__
File "site-packages\calibre\ebooks\rtf\input.py", line 197, in convert
File "site-packages\calibre\ebooks\rtf\input.py", line 88, in generate_xml
File "site-packages\calibre\ebooks\rtf2xml\ParseRtf.py", line 238, in parse_rtf
calibre.ebooks.rtf2xml.ParseRtf.InvalidRtfExceptio n: 'ascii' codec can't decode byte 0xe7 in position 490: ordinal not in range(128)Invalid RTF: File not ascii encoded.

_______________________



It's complaining about the first line of the file, which is usually, but not always, a plain old carriage return. These were saved from Word 2003 in RTF format, so I have no idea what the problem could be. Happy to send files if necessary.

Needless to say, saving them all in another format without a batch processor is not going to happen.
sglinert is offline   Reply With Quote