Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #10985
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andreas Tille <tille@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) |
| Date | Fri, 12 Oct 2018 16:20:02 +0200 |
| Message-ID | <wI6si-28W-9@gated-at.bofh.it> (permalink) |
| References | <wHH0T-3XO-67@gated-at.bofh.it> <wHYXL-6cv-1@gated-at.bofh.it> <wI3E5-vZ-11@gated-at.bofh.it> <wI477-F5-3@gated-at.bofh.it> <wI53b-1cW-1@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Fri Oct 12 14:18:20 2018 |
| Old-Return-Path | <tille@debian.org> |
| X-Amavis-Spam-Status | No, score=-7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -5 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| User-Agent | NeoMutt/20170113 (1.7.2) |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/16415 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/20181012141757.lpt5lmh4dhuzdsb3@an3as.eu |
| Approved | robomod@news.nic.it |
| Lines | 87 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Cc | debian-python@lists.debian.org, David Paleino <dapal@debian.org>, Federico Ceratto <federico.ceratto@gmail.com>, Picca Frédéric-Emmanuel <picca@debian.org> |
| X-Original-Date | Fri, 12 Oct 2018 16:17:57 +0200 |
| X-Original-Message-ID | <20181012141757.lpt5lmh4dhuzdsb3@an3as.eu> |
| X-Original-References | <20181011110643.hrxkvpfyzj4jjqeb@an3as.eu> <20181012061902.mf7vngqnwvxdge2s@an3as.eu> <20181012111533.4ym6loirbvnr2fnx@an3as.eu> <1539343938.2065153.1539680744.792D0909@webmail.messagingengine.com> <20181012124426.37nixbp2qupadu4o@an3as.eu> |
| Xref | csiph.com linux.debian.maint.python:10985 |
Show key headers only | View raw
Hi again,
On Fri, Oct 12, 2018 at 02:44:26PM +0200, Andreas Tille wrote:
> >
> > > > File "/usr/lib/python2.7/dist-packages/uncertainties/core.py", line 946, in <dictcomp>
> > > > ord(sup): normal for (normal, sup) in list(TO_SUPERSCRIPT.items())}
> >
> > Please always provide a minimal testcase, otherwise people have to do a
> > lot of work simply to get where you are..
>
> Hmmm, I've thought the "test case" I've given in my first mail, just
> doing
>
> from uncertainties import core
>
> would be sufficient.
>
> > Under Python 2.x, list(TO_SUPERSCRIPT.items()) is:
> >
> > [(43, '\xe2\x81\xba'),
> > (45, '\xe2\x81\xbb'),
> > (48, '\xe2\x81\xb0'),
> > […]
> > ]
> >
> > ie. strings with a length of 3 whilst ord() takes a single char. These
> > should therefore be probably defined as:
> >
> > TO_SUPERSCRIPT = {
> > 0x2b: u'⁺',
> > 0x2d: u'⁻',
> > […]
> >
> > .. instead, but I haven't tested or confirmed or anythinged that; I'll
> > leave it with you and upstream.
>
> I will contact upstream but I wanted to hear the opinion of the
> Uploaders of this package.
Before I discuss this with upstream I'd like to share another observation:
There is some 2to3 magic applied to the source code which has the effect
that the original source code file which has
$ grep -A4 "^TO_SUPERSCRIPT = {" uncertainties/core.py
TO_SUPERSCRIPT = {
0x2b: u'⁺',
0x2d: u'⁻',
0x30: u'⁰',
0x31: u'¹',
is turned into
grep -A4 "^TO_SUPERSCRIPT = {" uncertainties/core.py
TO_SUPERSCRIPT = {
0x2b: '⁺',
0x2d: '⁻',
0x30: '⁰',
0x31: '¹',
inside the pbuilder environment. I hacked around with the following code:
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ # for some very strange reason the RefactoringTool breaks the definions in TO_SUPERSCRIPT
+ find . -name core.py -exec sed -i "s/^\([[:space:]]\+0x[0-9a-f]\{2\}: \)'/\1u'/" \{\} \;
+ dh_auto_test
+endif
which left me with other test suite failures. Since I'm totally new to
this package and I have no idea whether this is some Debian specific
build (I had some quite unfriendly conversation with lmfit-py
upstream[1]) so would like to make sure there is no Debian specific
issue first. (Disclaimer: I'm totally new to this package as well as
lmfit-py - a Debian Med package just depends from the latter and nobody
else seem to have free time cycles to care. So please excuse my
naivity.)
Kind regards
Andreas.
[1] https://github.com/lmfit/lmfit-py/issues/502
--
http://fam-tille.de
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Updated python-uncertainties Andreas Tille <andreas@an3as.eu> - 2018-10-12 08:20 +0200
TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <andreas@an3as.eu> - 2018-10-12 13:20 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Chris Lamb <lamby@debian.org> - 2018-10-12 13:50 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <tille@debian.org> - 2018-10-12 14:50 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <tille@debian.org> - 2018-10-12 16:20 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Chris Lamb <lamby@debian.org> - 2018-10-12 16:40 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-12 17:10 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-12 17:40 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Piotr Ożarowski <piotr@debian.org> - 2018-10-12 18:20 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-12 18:40 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-13 11:10 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-13 11:50 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-13 14:00 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <andreas@an3as.eu> - 2018-10-15 11:40 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-15 12:00 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Karsten Hilbert <Karsten.Hilbert@gmx.net> - 2018-10-15 12:10 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <andreas@an3as.eu> - 2018-10-15 13:20 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-15 14:10 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-15 21:20 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Chris Lamb <lamby@debian.org> - 2018-10-15 22:10 +0200
RE:TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2018-10-15 21:10 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <andreas@an3as.eu> - 2018-10-16 09:10 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Dmitry Shachnev <mitya57@debian.org> - 2018-10-17 16:40 +0200
Re: TypeError: ord() expected a character, but string of length 3 found (Was: Updated python-uncertainties) Andreas Tille <tille@debian.org> - 2018-10-17 19:50 +0200
csiph-web