If html name ends with 3 periods, calibre will crash on conversion

Bug #801939 reported by cristi1979
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I'm doing html to epub conversion with calibre. If the name of the html file ends with 3 periods (ex: coco....html), calibre will crash during the conversion with the following message:

Creating EPUB Output...
67% Creating EPUB Output
        Looking for large trees in Brian%20W.%20Aldiss%20--%20Noaptea%20in%20care__html...
        No large trees found
        Split into 2 parts
Traceback (most recent call last):
  File "site.py", line 58, in main
  File "site-packages/calibre/ebooks/conversion/cli.py", line 283, in main
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1042, in run
  File "site-packages/calibre/ebooks/epub/output.py", line 169, in convert
  File "site-packages/calibre/ebooks/oeb/transforms/split.py", line 57, in __call__
  File "site-packages/calibre/ebooks/oeb/transforms/split.py", line 67, in split_item
  File "site-packages/calibre/ebooks/oeb/transforms/split.py", line 216, in __init__
  File "site-packages/calibre/ebooks/oeb/transforms/split.py", line 485, in commit
TypeError: not enough arguments for format string

If the name ends with only 2 periods or the periods are anywhere else in the name, the conversion is finishing correctly.

Related branches

summary: - If html name contains 3 periods, calibre will crash on conversion
+ If html name ends with 3 periods, calibre will crash on conversion
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 801939

Attach a file demonstrating/reproducing the problem. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny yellow icon next to "This bug is public" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
cristi1979 (cristi-falcas) wrote :

It looks that the content matters also: this is the minimum that crashes calibre. Any other character removed and it is ok.
The name needs a period and a space also.

Revision history for this message
cristi1979 (cristi-falcas) wrote :

I forgot to mention that I use linux.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.