Bug 1263503

Summary: [abrt] calibre: mobi6.py:745:sizeof_trailing_entries:IndexError: string index out of range
Product: [Fedora] Fedora Reporter: Joe Zeff <joe>
Component: calibreAssignee: Kevin Fenzi <kevin>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: chkr, frankly3d, kevin, markaldo, nushio, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/e58986d84b4f1b6a2770f68ab02566554d55a18f
Whiteboard: abrt_hash:72b75d5134ffea3e5e236ad4652ead8d8d373e81
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-02 15:21:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Joe Zeff 2015-09-16 02:31:24 UTC
Description of problem:
I installed calibrre, tried to convert an ebook from .mobi to .epub and got this instead.

Version-Release number of selected component:
calibre-2.23.0-1.fc21

Additional info:
reporter:       libreport-2.3.0
cmdline:        python2 /usr/bin/calibre-parallel
executable:     /usr/bin/calibre-parallel
kernel:         4.1.6-100.fc21.i686+PAE
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
#1 sizeof_trailing_entries in /usr/lib/calibre/calibre/ebooks/mobi/reader/mobi6.py:745
#2 text_section in /usr/lib/calibre/calibre/ebooks/mobi/reader/mobi6.py:750
#3 extract_text in /usr/lib/calibre/calibre/ebooks/mobi/reader/mobi6.py:756
#4 extract_content in /usr/lib/calibre/calibre/ebooks/mobi/reader/mobi6.py:147
#5 convert in /usr/lib/calibre/calibre/ebooks/conversion/plugins/mobi_input.py:35
#6 __call__ in /usr/lib/calibre/calibre/customize/conversion.py:241
#7 run in /usr/lib/calibre/calibre/ebooks/conversion/plumber.py:1042
#8 gui_convert in /usr/lib/calibre/calibre/gui2/convert/gui_conversion.py:25
#9 gui_convert_override in /usr/lib/calibre/calibre/gui2/convert/gui_conversion.py:31
#10 main in /usr/lib/calibre/calibre/utils/ipc/worker.py:192

Comment 1 Joe Zeff 2015-09-16 02:31:27 UTC
Created attachment 1073878 [details]
File: backtrace

Comment 2 Joe Zeff 2015-09-16 02:31:28 UTC
Created attachment 1073879 [details]
File: environ

Comment 3 Kevin Fenzi 2015-09-18 18:51:43 UTC
Is the mobi file freely available ? If so can you attach it to this bug?

Can you see if the problem persists with this scratch build: 

http://koji.fedoraproject.org/koji/taskinfo?taskID=11138189

Comment 4 Joe Zeff 2015-09-18 19:21:46 UTC
Alas, it's the .mobi version of an indie e-book, and I later found the .epub version.  I don't have the time today to test that new version but I'll gladly install and test it over the weekend.

Comment 5 Fedora End Of Life 2015-11-04 15:23:09 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 '21'.

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 21 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 6 Fedora End Of Life 2015-12-02 15:22:05 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 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 7 Mark Aldo 2019-11-13 04:52:04 UTC
In Python, a string is a single-dimensional array of characters. The string index out of range means that the index you are trying to access does not exist. In a string, that means you're trying to get a character from the string at a given point. If that given point does not exist , then you will be trying to get a character that is not inside of the string. Indexes in Python programming start at 0. This means that the maximum index for any string will always be length-1. There are several ways to account for this. Knowing the length of your string (using len() function)could certainly help you to avoid going over the index. More: http://net-informations.com/python/err/range.htm