[python-hdf5storage] 42/84: Fixed bug in Python 3.x where having a structured numpy.ndarray with a field with a non-ascii character threw UnicodeEncodeError instead of the UnicodeDecodeError that was originally expected.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:25:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 0.1.10
in repository python-hdf5storage.
commit 8ecd25cd0c486579d6a759638034cbb5b5584554
Author: Freja Nordsiek <fnordsie at gmail.com>
Date: Sun Apr 26 03:02:26 2015 -0400
Fixed bug in Python 3.x where having a structured numpy.ndarray with a field with a non-ascii character threw UnicodeEncodeError instead of the UnicodeDecodeError that was originally expected.
---
hdf5storage/Marshallers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hdf5storage/Marshallers.py b/hdf5storage/Marshallers.py
index 7c41c7e..7159162 100644
--- a/hdf5storage/Marshallers.py
+++ b/hdf5storage/Marshallers.py
@@ -864,7 +864,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
for i, s in enumerate(field_names):
fs[i] = np.array([c.encode('ascii') for c in s],
dtype='S1')
- except UnicodeDecodeError:
+ except UnicodeEncodeError:
del_attribute(grp[name], 'MATLAB_fields')
else:
set_attribute(grp[name], 'MATLAB_fields', fs)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-hdf5storage.git
More information about the debian-science-commits
mailing list