Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2010, 06:57 AM   #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: 34
Karma: 1024532
Join Date: May 2008
Device: iPad 3, iPod Touch 4
Can't convert RTF files

I have about 4000 rtf files that were saved from Word 2003. Calibre won't convert them. Here's the error:

__________________

ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Acceptance)

Convert book 1 of 1 (Acceptance)
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 0x039EAA90>,
'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 0x039EAC70>,
'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_iqiitk.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\Acceptance (4306)\Acceptance - 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 0xbe in position 53: 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 0xbe in position 53: ordinal not in range(128)Invalid RTF: File not ascii encoded.

________________

There's nothing odd about them, as far as I can see. Line 1 of the file in question seems to be a carriage return.

Saving the file as HTML and converting worked fine. But, needless to say, I am not up to converting 4000 files to html, one by one. Happy to send files if that would help figure out the problem.
sglinert is offline   Reply With Quote
Old 06-07-2010, 08:35 AM   #2
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 300
Karma: 392216
Join Date: Aug 2009
Location: UK
Device: PRS-505 Red,DSlibris,nook Glow,nook Simple rooted,nook HD+,Moon+,Zinio
Posting a sample is probably a good idea.

Did the conversion work with Calibre 0.6.xx ?
banjomike is offline   Reply With Quote
 
Enthusiast
Old 06-07-2010, 12:20 PM   #3
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: 34
Karma: 1024532
Join Date: May 2008
Device: iPad 3, iPod Touch 4
I am using .71. Where can I post the sample?

Last edited by sglinert; 06-07-2010 at 02:29 PM.
sglinert is offline   Reply With Quote
Old 06-07-2010, 04:44 PM   #4
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 300
Karma: 392216
Join Date: Aug 2009
Location: UK
Device: PRS-505 Red,DSlibris,nook Glow,nook Simple rooted,nook HD+,Moon+,Zinio
Quote:
Originally Posted by sglinert View Post
I am using .71. Where can I post the sample?
You attach the file using the "manage attachments" button when you reply to a message.
banjomike is offline   Reply With Quote
Old 06-07-2010, 05:17 PM   #5
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: 34
Karma: 1024532
Join Date: May 2008
Device: iPad 3, iPod Touch 4
Ah. I see. A sample file is attached. Hope someone can help.
Attached Files
File Type: rtf Abandoned.rtf (182.2 KB, 150 views)
sglinert is offline   Reply With Quote
Old 06-07-2010, 05:53 PM   #6
Zetmolm
Evangelist
Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.Zetmolm ought to be getting tired of karma fortunes by now.
 
Posts: 476
Karma: 950180
Join Date: Jan 2010
Device: Onyx Boox 60, PocketBook Touch
I cannot test your sample file now, but when I have problems with RTF files I open and save them in Wordpad (rather than Word) and so far that has always worked for me.
Zetmolm is offline   Reply With Quote
Old 06-07-2010, 05:56 PM   #7
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 300
Karma: 392216
Join Date: Aug 2009
Location: UK
Device: PRS-505 Red,DSlibris,nook Glow,nook Simple rooted,nook HD+,Moon+,Zinio
Er, well, I've tried it in 0.6.53 (not upgraded yet) and it fails. I think the problem is that there is only one line of text in the rtf file. A very long line.

Try the two files attached. An epub and a tweaked rtf. If the epub looks OK then try the rtf in your Calibre.

Zetmolm has suggested what I've tried. These files are the result. Loaded your rtf in Wordpad. Save as different name. Drop on Calibre. Convert. Yay.
Attached Files
File Type: epub Abandoned - anon.epub (92.4 KB, 63 views)
File Type: rtf Abandoned - anon.rtf (184.5 KB, 110 views)

Last edited by banjomike; 06-07-2010 at 06:02 PM.
banjomike is offline   Reply With Quote
Old 06-08-2010, 01:35 AM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,801
Karma: 12534285
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by sglinert View Post
There's nothing odd about them, as far as I can see. Line 1 of the file in question seems to be a carriage return.

Saving the file as HTML and converting worked fine. But, needless to say, I am not up to converting 4000 files to html, one by one. Happy to send files if that would help figure out the problem.
I got the same error. When I viewed the file in Notepad++ I noticed that it was one long line. There were no carriage return line feeds (CRLF) in the document.

I opened it in Wordpad and saved it. I then viewed it in Notepad++ and all of the CRLF were in place as I would have expected to see them the first time. This time the file converted just fine.

I bet you could modify the info in this thread to convert all of your RTF files to ePub. The thread explains how to do batch conversions of .doc files to epubs using free tools. If you switch the extension from .doc to .rtf the batch conversions should run fine. Specifically check out posts 23, 49 and 56.
DoctorOhh is offline   Reply With Quote
Old 06-08-2010, 08:51 AM   #9
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: 34
Karma: 1024532
Join Date: May 2008
Device: iPad 3, iPod Touch 4
How odd. The carriage returns show up in Word. In fact, in many cases, I had to replace soft returns with hard ones. I shall take a peek at the thread dwanthny recommends and see if that information is useful.
sglinert is offline   Reply With Quote
Old 06-08-2010, 10:31 AM   #10
theducks
Grand Sorcerer
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: 14,444
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by sglinert View Post
How odd. The carriage returns show up in Word. In fact, in many cases, I had to replace soft returns with hard ones. I shall take a peek at the thread dwanthny recommends and see if that information is useful.
It probably was in *nix format.

There is a menu item in Notepad++ to change the line endings from or to windows style or *nix style). Edit Menu, EOL Conversion
theducks is offline   Reply With Quote
Old 06-08-2010, 11:03 AM   #11
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: 34
Karma: 1024532
Join Date: May 2008
Device: iPad 3, iPod Touch 4
I found a solution. I have ABCText Converter, which batch converts just about everything to everything. So I converted all my rtfs to html and they convert fine. Thanks for your help, everyone.
sglinert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to convert RTF files to ePub Chrysanthemum Calibre 14 07-07-2010 01:57 PM
Can't convert RTF files sglinert Calibre 0 06-06-2010 10:14 PM
RTF vs HTML---best way to convert my files? ficbot Workshop 16 05-06-2010 06:05 PM
What is the best way to convert lrf to rtf? corroonb Sony Reader 7 03-12-2009 10:29 AM
Using Finereader to batch convert PDF files to RTF gdxf Sony Reader 9 10-28-2006 04:14 PM


All times are GMT -4. The time now is 02:00 AM.


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