Product:TIBCO Spotfire Analyst
Versions:All
Summary:
Error "Unable to translate bytes [E9] at index 1 from specified code page to Unicode." when executing Python Script in TIBCO Spotfire client
Details:
If the str() method is used in an Iron Python script to convert various types (unknown at runtime) to strings, it is likely that for some non-ASCII string values the conversion may fail with an error message similar to "Unable to translate bytes [E9] at index 1 from specified code page to Unicode."
Resolution:
It appears that using str() on a non-ASCII string throws the Exception: Unable to translate bytes from specified code page to Unicode.
Using the following line of code may throw the error:
Document.Properties["CurrentMonth"]=str('Décembre')
However removing 'str()' prevents the error:
Document.Properties["CurrentMonth"]='Décembre'
Not using str() on non-ASCII characters may be a workaround for this problem.
Versions:All
Summary:
Error "Unable to translate bytes [E9] at index 1 from specified code page to Unicode." when executing Python Script in TIBCO Spotfire client
Details:
If the str() method is used in an Iron Python script to convert various types (unknown at runtime) to strings, it is likely that for some non-ASCII string values the conversion may fail with an error message similar to "Unable to translate bytes [E9] at index 1 from specified code page to Unicode."
Resolution:
It appears that using str() on a non-ASCII string throws the Exception: Unable to translate bytes from specified code page to Unicode.
Using the following line of code may throw the error:
Document.Properties["CurrentMonth"]=str('Décembre')
However removing 'str()' prevents the error:
Document.Properties["CurrentMonth"]='Décembre'
Not using str() on non-ASCII characters may be a workaround for this problem.
Comments
0 comments
Article is closed for comments.