waldenner / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Creating logs and reports fails on Jython when suite name and test name contain non-ASCII characters #530

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example, if you have file 'ä.txt' with a test case 'Ö', creating logs
and reports fails with the following message. Syslog shows that the error
happens in `test.get_long_name` when running `return separator.join(names)`.

"""Unexpected error: UnicodeDecodeError: 'ascii' codec can't decode byte
0xc4 in position 0: ordinal not in range(128)."""

Logs/reports are created fine when only a test or suite has non-ASCII
characters in name. When the problem occurs it's still possible to use
rebot to create logs/reports afterwards.

Reproduced with Jython 2.5.1 both on RF 2.1.3 and the current trunk. I
suspect this is related to problems in handling non-ASCII characters in
data paths that is also covered by issue 522 and issue 454.

Original issue reported on code.google.com by pekka.klarck on 11 Apr 2010 at 1:37

GoogleCodeExporter commented 9 years ago
This is probably caused by http://bugs.jython.org/issue1592

Original comment by pekka.klarck on 11 Apr 2010 at 10:07

GoogleCodeExporter commented 9 years ago
Changes in r2914 fixed this partly but made running a directory containing 
non-ASCII
files impossible. Apparently os.listdir also returns content in different 
format on
Jython than on Python...

Original comment by pekka.klarck on 12 Apr 2010 at 12:09

GoogleCodeExporter commented 9 years ago
1) The root cause for the new problems is http://bugs.jython.org/issue1593.

2) I updated tests in r2917 so that they catch the old problem.

Original comment by pekka.klarck on 12 Apr 2010 at 7:39

GoogleCodeExporter commented 9 years ago
Added workaround for os.listdir bug on r2937. The updated tests pass so this is 
done.

Original comment by pekka.klarck on 12 Apr 2010 at 3:22

GoogleCodeExporter commented 9 years ago
This issue is included in RF 2.5 alpha 1.

Original comment by jussi.ao...@gmail.com on 6 May 2010 at 1:35