CSS "vertical-align: 33%" NOT supported in ePub -> DocX Conversion

Bug #1480300 reported by D. S. on 2015-07-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

The correct behavior would be for a positive vertical-align to become a superscript and a negative vertical-align to become a subscript. A bandaid fix would be to ignore the vertical-align entirely and generate a .docx.

Currently the .docx fails to be generated and an error is displayed.

This has been replicated on multiple platforms, but I have a MacBook Pro with Calibre 2.33.0 running 10.10.4. You can reach me at <email address hidden> if you need additional information.

From the error log:

Python function terminated unexpectedly: 'TextStyle' object has no attribute 'vertical_align'
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 209, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 114, in run_entry_point
    return getattr(pmod, func)()
  File "site-packages/calibre/utils/ipc/worker.py", line 193, in main
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1198, in run
  File "site-packages/calibre/ebooks/conversion/plugins/docx_output.py", line 65, in convert
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 416, in __call__
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 458, in process_item
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 509, in process_tag
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 509, in process_tag
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 486, in process_tag
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 563, in add_inline_tag
  File "site-packages/calibre/ebooks/docx/writer/from_html.py", line 166, in add_text
  File "site-packages/calibre/ebooks/docx/writer/styles.py", line 613, in create_text_style
  File "site-packages/calibre/ebooks/docx/writer/styles.py", line 223, in __init__
AttributeError: 'TextStyle' object has no attribute 'vertical_align'

Attach an epub file demonstrating/reproducing the problem to this bug report. You can do that by clicking the "Add attachment or patch" link at the bottom of the bug's page. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny lock icon next to "This report contains Public information" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
D. S. (salinay) wrote :

Here is a simple ePub which duplicates the error.

D. S. (salinay) wrote :

Requested document uploaded.

Changed in calibre:
status: Incomplete → New

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

 status fixreleased

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

Other bug subscribers