From: Greg R. <gr...@gm...> - 2010-05-05 13:05:08
|
I think this would be a general encoding problem. The default system encoding is probably 'ascii' for you. You probably want to work in 'utf-8'. Can you show us a bit more of the script? Are you opening the file? On Wed, May 5, 2010 at 1:46 PM, Ernesto Domato <ed...@gm...> wrote: > Hi, Yesterday I was running a performance test using the Grinder > application that I have configured with Jython 2.5.1 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 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |