Skip to content

Commit 1b83253

Browse files
committed
fix: use text_type on str for exceptions
1 parent 74cd3bd commit 1b83253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/utils/provenance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def safe_encode(x, as_literal=True):
183183
return pm.Literal(dumps(x), nipype_ns['pickle'])
184184
except TypeError as e:
185185
iflogger.info(e)
186-
value = "Could not encode: " + text_type(e, 'utf-8')
186+
value = "Could not encode: " + text_type(str(e), 'utf-8')
187187
if not as_literal:
188188
return value
189189
return pm.Literal(value, pm.XSD['string'])

0 commit comments

Comments
 (0)