You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function _idval(val, argname, idx, idfn) of mentioned source file next code is present:
elif_PY2andisinstance(val, unicode):
# special case for python 2: if a unicode string is# convertible to ascii, return it as an str() object insteadtry:
returnstr(val)
exceptUnicodeDecodeError:
# fallthroughpassreturnstr(argname)+str(idx)
In case val variable is unicode value, that contains characters with ordinal > 128, str(val) fails with UnicodeEncodeError, which one would like to catch and fall back to autogenerated parameter id value, like argname1, argname2 etc. The current _idval code causes to the collection time exception, for example UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-5: ordinal not in range(128) due to wrong error type being caught. To fix the problem, replace line