Bug 1127836 - weasyprint depends on too old python-pyphen for non en hyphenation
Summary: weasyprint depends on too old python-pyphen for non en hyphenation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: weasyprint
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 16:13 UTC by Alon Levy
Modified: 2014-09-02 03:55 UTC (History)
1 user (show)

Fixed In Version: python-pyphen-0.9.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-23 02:00:07 UTC


Attachments (Terms of Use)

Description Alon Levy 2014-08-07 16:13:04 UTC
Description of problem:
When trying to weasyprint a site using 'he' lang an exception is thrown. Investigation shows fedora 20 (and rawhide) includes a too old pyphen package. I'm reporting this bug and opening a bug on pyphen requesting and providing patches for an 0.9.1 update from the current 0.7 version.

Version-Release number of selected component (if applicable):
weasyprint-0.21-2.fc20.noarch

How reproducible:
100%

Steps to Reproduce:
1. cat > test_he.html << EOF
<html lang="he">
<body style="width: 100px">
one two three four five six
</body>
</html>
EOF
2. weasyprint test_he.html test.pdf

Actual results:
stack trace about missing method 'language_fallback' in pyphen, see below.

Expected results:
successfully completing.

Solution:
upgrade pyphen to 0.9.1 (tested, opening bug after this one, have a recursive dependency of the Descriptions :)

Additional info:
This is the complete stack trace from executing the command line in 'Steps to Reproduce':

Traceback (most recent call last):
  File "/usr/bin/weasyprint", line 9, in <module>
    load_entry_point('WeasyPrint==0.21', 'console_scripts', 'weasyprint')()
  File "/usr/lib/python2.7/site-packages/weasyprint/__main__.py", line 141, in main
    getattr(html, 'write_' + format_)(output, **kwargs)
  File "/usr/lib/python2.7/site-packages/weasyprint/__init__.py", line 160, in write_pdf
    return self.render(stylesheets).write_pdf(target, zoom)
  File "/usr/lib/python2.7/site-packages/weasyprint/__init__.py", line 132, in render
    return Document._render(self, stylesheets, enable_hinting)
  File "/usr/lib/python2.7/site-packages/weasyprint/document.py", line 308, in _render
    return cls([Page(p, enable_hinting) for p in page_boxes],
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/__init__.py", line 50, in layout_document
    pages = list(make_all_pages(context, root_box))
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/pages.py", line 541, in make_all_pages
    context, root_box, page_type, resume_at, content_empty)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/pages.py", line 503, in make_page
    positioned_boxes, positioned_boxes, adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 60, in block_level_layout
    absolute_boxes, fixed_boxes, adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 88, in block_box_layout
    page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 414, in block_container_layout
    adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 60, in block_level_layout
    absolute_boxes, fixed_boxes, adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 88, in block_box_layout
    page_is_empty, absolute_boxes, fixed_boxes, adjoining_margins)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/blocks.py", line 300, in block_container_layout
    for line, resume_at in lines_iterator:
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/inlines.py", line 48, in iter_line_boxes
    device_size, absolute_boxes, fixed_boxes)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/inlines.py", line 100, in get_next_linebox
    line_fixed, line_placeholders, waiting_floats)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/inlines.py", line 606, in split_inline_box
    waiting_floats)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/inlines.py", line 503, in split_inline_level
    context, box, max_x - position_x, max_x, skip)
  File "/usr/lib/python2.7/site-packages/weasyprint/layout/inlines.py", line 686, in split_text_box
    text, box.style, context.enable_hinting, available_width, line_width)
  File "/usr/lib/python2.7/site-packages/weasyprint/text.py", line 488, in split_first_line
    lang = style.lang and pyphen.language_fallback(style.lang)
AttributeError: 'module' object has no attribute 'language_fallback'

Comment 1 Fedora Update System 2014-08-07 20:22:26 UTC
python-pyphen-0.9.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-pyphen-0.9.1-1.fc20

Comment 2 Fedora Update System 2014-08-07 20:30:39 UTC
python-pyphen-0.9.1-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-pyphen-0.9.1-1.el6

Comment 3 Fedora Update System 2014-08-08 00:41:38 UTC
Package python-pyphen-0.9.1-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-pyphen-0.9.1-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-2157/python-pyphen-0.9.1-1.el6
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-08-23 02:00:07 UTC
python-pyphen-0.9.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2014-09-02 03:55:34 UTC
python-pyphen-0.9.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


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