Actions
Bug #4349
closedTypeError: expected bytes, str found in make_string_value
Start date:
2019-10-18
Due date:
% Done:
100%
Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
1.2.0
Fixed in version:
1.2.1
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
Reported here: https://saxonica.plan.io/boards/4/topics/7618
When building a PyXdmValue from a string we get the following error:
TypeError: expected bytes, str found
Bug fix applied in the make_string_value function of the class PySaxonProcessor. Add the following code to convert the Python str to a C char array:
py_value_string = str_.encode('UTF-8') if str_ is not None else None
cdef char * c_str_ = py_value_string if str_ is not None else ""
Added test case to the unit test cases.
Updated by O'Neil Delpratt about 5 years ago
Bug committed in the saxonc.pyx file: https://dev.saxonica.com/repos/archive/opensource/latest9.9/hec/Saxon.C.API/python-saxon/saxonc.pyx
Updated by O'Neil Delpratt about 5 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 1.2.1
Bug fix applied in the Saxon/C maintenance release 1.2.1
Please register to edit this issue
Actions