[Python-modules-team] Bug#685302: Installing html package with Python 3

Russel Winder russel at winder.org.uk
Sun Aug 19 15:56:10 UTC 2012


Richard,

On Debian Unstable I am trying to install the html package for Python 3.
For Python 2, I did a "pip install html" and it worked fine. Using
"pip-3.2 install html" I got an error from the execution of the
setup.py. I sent in a bug report but then thought actually it is not a
packaging problem, something Jakub replied with to my bug report. I
tried downloading the tarball and installing but got the same problem.

>  File "/root/build/html/setup.py", line 12, in <module>
>
>    long_description = __doc__.decode('utf8'),
>
>AttributeError: 'str' object has no attribute 'decode'

__doc__ is of type str which has a method decode in Python 2, but decode
is a method on bytearray in Python 3. I removed the decode call and it
installed fine with Python 3.

Perhaps there needs to be a Python 2 / Python difference in the setup.py
file?

Thanks.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20120819/213db300/attachment.pgp>


More information about the Python-modules-team mailing list