[Python-modules-team] Bug#860138: scipy handles error messages poorly

James Van Zandt jim.vanzandt at gmail.com
Tue Apr 11 23:59:31 UTC 2017


Package: python-scipy
Version: 0.18.1-2

I was running a program under the debugger pdb, and a bug generated this
message:

(Pdb) n
TypeError: TypeErro...0, 1).",)
>
/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py(212)_root_hybr()
-> shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
(Pdb)

I submit that this message is not helpful.

Eventually I found the code in minpack.py that assembled the message, and
determined that the complete message was

"fsolve: there is a mismatch between the input and output shape of the
'func' argument 'mce'.Shape should be (9,) but it is (10, 1)."

which would actually have been helpful.  It should not have been
abbreviated.

It may be appropriate to reassign this bug to pdb.

          - Jim Van Zandt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20170411/d48d46ae/attachment.html>


More information about the Python-modules-team mailing list