Re: [Myghty-users] errors running under 1.1
Brought to you by:
zzzeek
From: Michael B. <mi...@zz...> - 2006-10-30 16:55:21
|
this often occurs because the original template file contains a unicode character. you might want to insure that the template itself has the proper "magic encoding" comment at the top. the "encoding_errors" setting only applies to the output stream. if that doent work, send the full stack trace and we'll go from there. On Oct 29, 2006, at 11:37 PM, David Geller wrote: > Hi, > > I have an application which ran fine under 1.0.1. Now, after upgrading > to 1.1, I get errors like: > > Error(UnicodeEncodeError): 'ascii' codec can't encode character > u'\xa9' > in position 7021: ordinal not in range(128) > File: /usr/local/lib/python2.4/codecs.py line 178 > Context: 175: > 176: """ Writes the object's contents encoded to self.stream. > 177: """ > 178: data, consumed = self.encode(object, self.errors) > 179: self.stream.write(data) > 180: > 181: def writelines(self, list): > Traceback: /usr/local/lib/python2.4/codecs.py:178 > /usr/local/lib/python2.4/site-packages/mod_python/apache.py:299 > > > A. What is going on here? Why did these pages work fine before? > > B. Is there a way to turn off this "strict" checking (if, indeed, > there > are bad char's in the streams, which I didn't think I had)? I tried > setting the "endcoding_errors" option explained in the docs, but this > did not get rid of the errors. This I did by setting > > PythonOption MyghtyEncodingErrors r"ignore" > > in the apache httpd.conf (I'm running under mod_python). > > C. Is it best to turn off unicode entirely? Currently, I have no need > for it. If turned off, should these errors go away? (I haven't > tried that). > > D. Is there an easy way to examine the stream so to see what > exactly is > before and after the position mentioned in the error message? If > indeed > there is invalid ascii, I would like to correct it... > > > Thanks a lot!! > > David > > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Myghty-users mailing list > Myg...@li... > https://lists.sourceforge.net/lists/listinfo/myghty-users |