Author orshemy
Recipients orshemy
Date 2018-12-11.14:52:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544539923.61.0.788709270274.issue35464@psf.upfronthosting.co.za>
In-reply-to
Content
when dumping a value coming from numpy.random.choice([True,False]) the exception raised is very unclear.

json.dumps(result)

  File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")

which prints "True is not JSON serializable" - but it should actually print "<type 'numpy.bool_'> is not JSON serializable".
History
Date User Action Args
2018-12-11 14:52:03orshemysetrecipients: + orshemy
2018-12-11 14:52:03orshemysetmessageid: <1544539923.61.0.788709270274.issue35464@psf.upfronthosting.co.za>
2018-12-11 14:52:03orshemylinkissue35464 messages
2018-12-11 14:52:03orshemycreate