transaction.commit() unicode problem with exceptions [transaction-1.3.0, py2.7.3]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
transaction.
with logging unicode traceback stack to self._failure_
is io.BytesIO in py2.x (defined in transaction.compat)
I get the following exception - TypeError: 'unicode' does not have the buffer interface.
Replacing BytesIO with StringIO.StringIO fixed the problem.
Here's full traceback:
/home/seba/
105 """ See ITransactionMan
106 """
--> 107 return self.get().commit()
108
109 def abort(self):
/home/seba/
350 tb = None
351 try:
--> 352 t, v, tb = self._saveAndGe
353 self._callAfter
354 reraise(t, v, tb)
/home/seba/
372 t, v, tb = sys.exc_info()
373 # Record how we got into commit().
--> 374 traceback.
375 # Append the stack entries from here down to the exception.
376 traceback.
/usr/lib/
267 except ZeroDivisionError:
268 f = sys.exc_
--> 269 print_list(
270
271 def format_
/usr/lib/
23 ' File "%s", line %d, in %s' % (filename,
24 if line:
---> 25 _print(file, ' %s' % line.strip())
26
27 def format_
/usr/lib/
11
12 def _print(file, str='', terminator='\n'):
---> 13 file.write(
14
15
TypeError: 'unicode' does not have the buffer interface
I'm having the exact same issue.