Bug 918321 - [abrt] calibre-0.9.21-1.fc18: ParseRtf.py:246:parse_rtf:InvalidRtfException:
Summary: [abrt] calibre-0.9.21-1.fc18: ParseRtf.py:246:parse_rtf:InvalidRtfException:
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: calibre
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4412da1a147966e2f840b6348c4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 22:08 UTC by Kerry
Modified: 2015-06-30 01:22 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-30 01:22:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.73 KB, text/plain)
2013-03-05 22:08 UTC, Kerry
no flags Details
File: core_backtrace (760 bytes, text/plain)
2013-03-05 22:08 UTC, Kerry
no flags Details
File: environ (4.72 KB, text/plain)
2013-03-05 22:08 UTC, Kerry
no flags Details
File: smolt_data (2.34 KB, text/plain)
2013-03-05 22:08 UTC, Kerry
no flags Details
Document which crashes ebook-convert (322.42 KB, application/rtf)
2013-03-07 03:11 UTC, Kerry
no flags Details

Description Kerry 2013-03-05 22:08:27 UTC
Description of problem:
ebook-convert Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.rtf Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.epub

Version-Release number of selected component:
calibre-0.9.21-1.fc18

Additional info:
cmdline:        python2 /bin/ebook-convert 'Journey To the Western Islands of Scotland, A - Keith Inch.rtf' 'Journey To the Western Islands of Scotland, A - Keith Inch.epub'
executable:     /bin/ebook-convert
kernel:         3.7.8-202.fc18.x86_64
uid:            500

Truncated backtrace:
ParseRtf.py:246:parse_rtf:InvalidRtfException: 
Invalid RTF: document doesn't start with {

Exception in token processing

Traceback (most recent call last):
  File "/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 331, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1009, in run
    accelerators, tdir)
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 239, in __call__
    log, accelerators)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 244, in convert
    xml = self.generate_xml(stream.name)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 103, in generate_xml
    parser.parse_rtf()
  File "/usr/lib64/calibre/calibre/ebooks/rtf2xml/ParseRtf.py", line 246, in parse_rtf
    raise InvalidRtfException, msg
InvalidRtfException: 
Invalid RTF: document doesn't start with {

Exception in token processing

Local variables in innermost frame:
enc: 'cp1252'
check_encoding_obj: <calibre.ebooks.rtf2xml.check_encoding.CheckEncoding instance at 0x2a82878>
encode_obj: <calibre.ebooks.rtf2xml.default_encoding.DefaultEncoding instance at 0x2a82050>
default_font_num: 'not-defined'
self: <calibre.ebooks.rtf2xml.ParseRtf.ParseRtf instance at 0x2afb200>
tokenize_obj: <calibre.ebooks.rtf2xml.tokenize.Tokenize instance at 0x2afb3b0>
platform: 'Windows'
return_value: None
msg: "\nInvalid RTF: document doesn't start with {\n\nException in token processing"
process_tokens_obj: <calibre.ebooks.rtf2xml.process_tokens.ProcessTokens instance at 0x2a82fc8>
line_obj: <calibre.ebooks.rtf2xml.line_endings.FixLineEndings instance at 0x2afb0e0>
code_page: 'ansicpg1252'

Comment 1 Kerry 2013-03-05 22:08:32 UTC
Created attachment 705678 [details]
File: backtrace

Comment 2 Kerry 2013-03-05 22:08:34 UTC
Created attachment 705681 [details]
File: core_backtrace

Comment 3 Kerry 2013-03-05 22:08:37 UTC
Created attachment 705684 [details]
File: environ

Comment 4 Kerry 2013-03-05 22:08:39 UTC
Created attachment 705686 [details]
File: smolt_data

Comment 5 Kevin Fenzi 2013-03-06 14:55:57 UTC
This looks to be incorrectly formatted rtf. 

Can anything else read it?

If you update to the latest calibre in my side repo does it do any better: 

su
cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/kevin/calibre/fedora-calibre.repo
yum clean all
yum update calibre

Comment 6 Kerry 2013-03-07 03:11:51 UTC
Created attachment 706317 [details]
Document which crashes ebook-convert

Comment 7 Kerry 2013-03-07 03:12:59 UTC
The document opens correctly in Libre Office.

Comment 8 Kerry 2013-03-07 03:30:54 UTC
The crash was from calibre-0.9.21-1.fc18. I think I was already updating from your repository before this.

Comment 9 Kevin Fenzi 2013-05-02 21:14:23 UTC
n the next few days there will be a newer calibre version available in updates-testing. 
Can you try: 'yum --enablerepo=updates-testing update calibre' and try and duplicate the problem with the new version? 

Thanks.

Comment 10 Kerry 2013-05-03 00:05:29 UTC
Still broken with this version:

$ rpm -q calibre
calibre-0.9.28-1.fc18.x86_64
$ ebook-convert Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.rtf Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.epub
1% Converting input to HTML...
InputFormatPlugin: RTF Input running
on Journey To the Western Islands of Scotland, A - Keith Inch.rtf
Converting RTF to XML...
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 329, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1009, in run
    accelerators, tdir)
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 239, in __call__
    log, accelerators)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 244, in convert
    xml = self.generate_xml(stream.name)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 103, in generate_xml
    parser.parse_rtf()
  File "/usr/lib64/calibre/calibre/ebooks/rtf2xml/ParseRtf.py", line 246, in parse_rtf
    raise InvalidRtfException, msg
calibre.ebooks.rtf2xml.ParseRtf.InvalidRtfException: 
Invalid RTF: document doesn't start with {

Exception in token processing

Comment 11 Kerry 2013-05-05 20:48:05 UTC
And in the very latest:

$ rpm -q calibre
calibre-0.9.29-1.fc18.x86_64
$ ebook-convert Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.rtf Journey\ To\ the\ Western\ Islands\ of\ Scotland\,\ A\ -\ Keith\ Inch.epub
1% Converting input to HTML...
InputFormatPlugin: RTF Input running
on Journey To the Western Islands of Scotland, A - Keith Inch.rtf
Converting RTF to XML...
Traceback (most recent call last):
  File "/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 329, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1009, in run
    accelerators, tdir)
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 239, in __call__
    log, accelerators)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 244, in convert
    xml = self.generate_xml(stream.name)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 103, in generate_xml
    parser.parse_rtf()
  File "/usr/lib64/calibre/calibre/ebooks/rtf2xml/ParseRtf.py", line 246, in parse_rtf
    raise InvalidRtfException, msg
calibre.ebooks.rtf2xml.ParseRtf.InvalidRtfException: 
Invalid RTF: document doesn't start with {

Exception in token processing

Comment 12 Fedora End Of Life 2013-12-21 15:25:06 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2014-02-05 23:04:56 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 14 Kerry 2014-02-13 20:29:26 UTC
It is still broken in Fedora 20.

$ rpm -q calibre
calibre-1.21.0-1.fc20.x86_64
$ /bin/ebook-convert 'Journey To the Western Islands of Scotland, A - Keith Inch.rtf' 'Journey To the Western Islands of Scotland, A - Keith Inch.epub'
1% Converting input to HTML...
InputFormatPlugin: RTF Input running
on /home/nice/Documents/Reader/Reader2/ToRead/Journey To the Western Islands of Scotland, A - Keith Inch.rtf
Converting RTF to XML...
Traceback (most recent call last):
  File "/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 359, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1035, in run
    accelerators, tdir)
  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 241, in __call__
    log, accelerators)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 256, in convert
    xml = self.generate_xml(stream.name)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/rtf_input.py", line 113, in generate_xml
    parser.parse_rtf()
  File "/usr/lib64/calibre/calibre/ebooks/rtf2xml/ParseRtf.py", line 251, in parse_rtf
    raise InvalidRtfException, msg
calibre.ebooks.rtf2xml.ParseRtf.InvalidRtfException: 
Invalid RTF: document doesn't start with {

Exception in token processing

Comment 15 Kevin Fenzi 2014-02-13 21:08:39 UTC
This document actually doesn't seem to be rtf at all.

If you rename it to .txt instead of .rtf does it convert ok?

Comment 16 Fedora End Of Life 2015-05-29 08:54:39 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Fedora End Of Life 2015-06-30 01:22:04 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.