Bug 1123642 - [abrt] python-xhtml2pdf: util.py:39:<module>:ImportError: Reportlab Version 2.1+ is needed!
Summary: [abrt] python-xhtml2pdf: util.py:39:<module>:ImportError: Reportlab Version 2...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-xhtml2pdf
Version: 20
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:2d1af7d3a3d5a24ab2d2210036b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-27 13:57 UTC by Andrey V. Henneberg
Modified: 2015-07-03 07:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 21:47:55 UTC


Attachments (Terms of Use)
File: backtrace (7.48 KB, text/plain)
2014-07-27 13:57 UTC, Andrey V. Henneberg
no flags Details
File: environ (3.38 KB, text/plain)
2014-07-27 13:57 UTC, Andrey V. Henneberg
no flags Details

Description Andrey V. Henneberg 2014-07-27 13:57:10 UTC
Description of problem:
[andrey@henneberg-nb postcard]$ /usr/bin/pisa
****************************************************
IMPORT ERROR!
Reportlab Version 2.1+ is needed!
****************************************************

The following Python packages are required for PISA:
- Reportlab Toolkit >= 2.2 <http://www.reportlab.org/>
- HTML5lib >= 0.11.1 <http://code.google.com/p/html5lib/>

Optional packages:
- pyPDF <http://pybrary.net/pyPdf/>
- PIL <http://www.pythonware.com/products/pil/>

No handlers could be found for logger "xhtml2pdf"
Traceback (most recent call last):
  File "/usr/bin/pisa", line 9, in <module>
    load_entry_point('xhtml2pdf==0.0.5', 'console_scripts', 'pisa')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/xhtml2pdf/__init__.py", line 41, in <module>
    from xhtml2pdf.util import REPORTLAB22
  File "/usr/lib/python2.7/site-packages/xhtml2pdf/util.py", line 39, in <module>
    raise ImportError("Reportlab Version 2.1+ is needed!")
ImportError: Reportlab Version 2.1+ is needed!
[andrey@henneberg-nb postcard]$ rpm -q python-reportlab
python-reportlab-3.1.8-1.fc20.i686

Version-Release number of selected component:
python-xhtml2pdf-0.0.5-1.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python /usr/bin/pisa
dso_list:       python-setuptools-1.4.2-1.fc20.noarch
executable:     /usr/bin/pisa
kernel:         3.15.6-200.fc20.i686+PAE
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
#1 <module> in /usr/lib/python2.7/site-packages/xhtml2pdf/util.py:39
#2 <module> in /usr/lib/python2.7/site-packages/xhtml2pdf/__init__.py:41
#3 load in /usr/lib/python2.7/site-packages/pkg_resources.py:2108
#4 load_entry_point in /usr/lib/python2.7/site-packages/pkg_resources.py:2394
#5 load_entry_point in /usr/lib/python2.7/site-packages/pkg_resources.py:357
#6 <module> in /usr/bin/pisa:9

Comment 1 Andrey V. Henneberg 2014-07-27 13:57:13 UTC
Created attachment 921474 [details]
File: backtrace

Comment 2 Andrey V. Henneberg 2014-07-27 13:57:15 UTC
Created attachment 921475 [details]
File: environ

Comment 3 Jakub Dorňák 2014-10-21 21:24:59 UTC
This is caused because there is python-reportlab-3.1.8-4.fc21.x86_64 available in Fedora 21, while refuses to work with other version than 2.x >= 2.2.

I have tried to comment out the checks:

xhtml2pdf/util.py:38:39
if not (reportlab.Version[0] == "2" and reportlab.Version[2] >= "1"):
    raise ImportError("Reportlab Version 2.1+ is needed!")


xhtml2pdf/__init__.py line:43:44
    if not REPORTLAB22:
        raise ImportError, "Reportlab Toolkit Version 2.2 or higher needed"

and it seems to work fine.

So you may probably just update the conditions to allow reportlab-3.x.

Comment 4 Fedora End Of Life 2015-05-29 12:29:25 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 5 Fedora End Of Life 2015-06-29 21:47:55 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.

Comment 6 Maciej Mrozowski 2015-07-02 19:32:21 UTC
Please reopen. Reproduced with Fedora 22.

[mrozowsk@cnu420dqzs ~]$ xhtml2pdf 
****************************************************
IMPORT ERROR!
Reportlab Version 2.1+ is needed!
****************************************************

The following Python packages are required for PISA:
- Reportlab Toolkit >= 2.2 <http://www.reportlab.org/>
- HTML5lib >= 0.11.1 <http://code.google.com/p/html5lib/>

Optional packages:
- pyPDF <http://pybrary.net/pyPdf/>
- PIL <http://www.pythonware.com/products/pil/>

No handlers could be found for logger "xhtml2pdf"
Traceback (most recent call last):
  File "/usr/bin/xhtml2pdf", line 9, in <module>
    load_entry_point('xhtml2pdf==0.0.5', 'console_scripts', 'xhtml2pdf')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/xhtml2pdf/__init__.py", line 41, in <module>
    from xhtml2pdf.util import REPORTLAB22
  File "/usr/lib/python2.7/site-packages/xhtml2pdf/util.py", line 39, in <module>
    raise ImportError("Reportlab Version 2.1+ is needed!")
ImportError: Reportlab Version 2.1+ is needed!



[mrozowsk@cnu420dqzs Documentation]$ rpm -q python-reportlab 
python-reportlab-3.1.8-4.fc22.x86_64

Comment 7 Matthias Runge 2015-07-03 07:00:42 UTC
This project seems to be dead upstream (more or less).

Unfortunately, I don't have the time to fix it. 

Latest upstream requires reportlab version 2.5 (no other). Reportlab is currently in version 3.1.8 in fedora 22.


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