[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grinder-use
Subject:    [Grinder-use] Jython 2.5.1 encoding problem
From:       Ernesto Domato <edomat () gmail ! com>
Date:       2010-05-04 16:05:45
Message-ID: y2ib05d91a11005040905rf822cc4asf03bab95cc74380c () mail ! gmail ! com
[Download RAW message or body]

Hi, I was running a test today and found this problem that I don't
know how to resolve because I'm new to Python still. It seems that the
problem (for what I understand on the error log) is on the encoding of
the string that I'm trying to print into a file. This is the error
message:

04/05/10 11:53:15 (thread 0 run 0 test 18): Aborted run due to Jython
exception: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't
encode character u'\xf3' in position 1404: ordinal not in range(128)
[calling TestRunner]

<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode
character u'\xf3' in position 1404: ordinal not in range(128)

	print >> file, text

	File "c:\grinder-3.4\pruebas\minima-final.py", line 1411, in writeToFile

	writeToFile(result.text, self.NTLM.cnt)

	File "c:\grinder-3.4\pruebas\minima-final.py", line 645, in prueba

	self.prueba()

	File "c:\grinder-3.4\pruebas\minima-final.py", line 1331, in __call__

As you can see, the exception occurs with "print >> file, text" where
text seems to contain a unicode character outside the 128 range.

Please let me know anything else that you need me to provide to help
fix this issue and thanks.
Ernesto

------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
grinder-use@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/grinder-use
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic