Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #9977 > unrolled thread

python-csb: Please help: Clean target throws UnicodeDecodeError

Started byAndreas Tille <andreas@an3as.eu>
First post2017-11-13 08:50 +0100
Last post2017-11-13 10:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  python-csb: Please help: Clean target throws UnicodeDecodeError Andreas Tille <andreas@an3as.eu> - 2017-11-13 08:50 +0100
    Re: python-csb: Please help: Clean target throws UnicodeDecodeError Ghislain Vaillant <ghisvail@gmail.com> - 2017-11-13 10:20 +0100

#9977 — python-csb: Please help: Clean target throws UnicodeDecodeError

FromAndreas Tille <andreas@an3as.eu>
Date2017-11-13 08:50 +0100
Subjectpython-csb: Please help: Clean target throws UnicodeDecodeError
Message-ID<uLhFf-38Q-1@gated-at.bofh.it>
Hi,

I'm trying to upgrade python-csb to the new upstream version (in
Git[1]).  If I try to build it I get:


gbp:info: Building with (cowbuilder) for sid
gbp:info: Tarballs 'python-csb_1.2.5+dfsg.orig.tar.gz' not found at '../tarballs/'
gbp:info: Creating /home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb_1.2.5+dfsg.orig.tar.gz
gbp:info: Exporting 'WC' to '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp'
gbp:info: Moving '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp' to '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
I: using cowbuilder as pbuilder
dpkg-source: info: applying exclude_online_tests.patch
dpkg-source: info: applying reproducible.patch
dh clean --with python2,python3 --buildsystem=pybuild
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
dh_auto_clean
I: pybuild base:184: python2.7 setup.py clean 
running clean
removing '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg/.pybuild/pythonX.Y_2.7/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
I: pybuild base:184: python3.6 setup.py clean 
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    __doc__ = open('README.rst').read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 4205: ordinal not in range(128)
E: pybuild pybuild:283: clean: plugin distutils failed with: exit code=1: python3.6 setup.py clean 
dh_auto_clean: pybuild --clean -i python{version} -p 3.6 returned exit code 13
debian/rules:21: recipe for target 'override_dh_auto_clean' failed


Any idea how to fix this?

Kind regards

       Andreas.


[1] https://anonscm.debian.org/git/debian-med/python-csb.git

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#9978

FromGhislain Vaillant <ghisvail@gmail.com>
Date2017-11-13 10:20 +0100
Message-ID<uLj4l-49P-5@gated-at.bofh.it>
In reply to#9977

On 13/11/17 07:41, Andreas Tille wrote:
> Hi,
> 
> I'm trying to upgrade python-csb to the new upstream version (in
> Git[1]).  If I try to build it I get:
> 
> 
> gbp:info: Building with (cowbuilder) for sid
> gbp:info: Tarballs 'python-csb_1.2.5+dfsg.orig.tar.gz' not found at '../tarballs/'
> gbp:info: Creating /home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb_1.2.5+dfsg.orig.tar.gz
> gbp:info: Exporting 'WC' to '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp'
> gbp:info: Moving '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp' to '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
> I: using cowbuilder as pbuilder
> dpkg-source: info: applying exclude_online_tests.patch
> dpkg-source: info: applying reproducible.patch
> dh clean --with python2,python3 --buildsystem=pybuild
>     debian/rules override_dh_auto_clean
> make[1]: Entering directory '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
> dh_auto_clean
> I: pybuild base:184: python2.7 setup.py clean
> running clean
> removing '/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg/.pybuild/pythonX.Y_2.7/build' (and everything under it)
> 'build/bdist.linux-x86_64' does not exist -- can't clean it
> 'build/scripts-2.7' does not exist -- can't clean it
> I: pybuild base:184: python3.6 setup.py clean
> Traceback (most recent call last):
>    File "setup.py", line 8, in <module>
>      __doc__ = open('README.rst').read()
>    File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
>      return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 4205: ordinal not in range(128)
> E: pybuild pybuild:283: clean: plugin distutils failed with: exit code=1: python3.6 setup.py clean
> dh_auto_clean: pybuild --clean -i python{version} -p 3.6 returned exit code 13
> debian/rules:21: recipe for target 'override_dh_auto_clean' failed
> 
> 
> Any idea how to fix this?

In the preamble of `setup.py` add:

```
from io import open
```

Then replace subsequent calls to `open` in the file with:

```
open(..., encoding="utf-8")
```

Worth forwarding the patch upstream.

Ghis

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web