Here is the stack output. I will trace it out tomorrow and see what I
can do with it. It does not look positive because it seems to be a deep
rooted Python thing. I will get back to you though.

Traceback (most recent call last):
  File "/home/niessner/Projects/Testbed/ExternalAPIs/Python/tbm.py",
line 144, in __run
    cb (m, cname)
  File "/home/niessner/Projects/Testbed/ExternalAPIs/Python/monitor.py",
line 79, in process
    message.export (out, 0, name_="communication")
  File "/tmp/Test71/SciPyScripts/communicationsInterface.py", line 183,
in export
    self.exportChildren(outfile, level + 1, namespace_, name_)
  File "/tmp/Test71/SciPyScripts/communicationsInterface.py", line 196,
in exportChildren
    self.response.export(outfile, level, namespace_, name_='response', )
  File "/tmp/Test71/SciPyScripts/communicationsInterface.py", line 920,
in export
    self.exportChildren(outfile, level + 1, namespace_, name_)
  File "/tmp/Test71/SciPyScripts/communicationsInterface.py", line 939,
in exportChildren
    outfile.write('<%srequest>%s</%srequest>\n' % (namespace_,
quote_xml(self.get_request()), namespace_))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb5' in
position 18: ordinal not in range(128)

On Mon, 2008-12-01 at 12:09 -0800, Dave Kuhlman wrote:
> > From: Al Niessner <[EMAIL PROTECTED]>
> > To: "generateds-users@lists.sourceforge.net" 
> > <generateds-users@lists.sourceforge.net>
> > Sent: Monday, December 1, 2008 11:37:48 AM
> > Subject: [Generateds-users] Unicode problem
> >
> >
> > I am having some minor problems with the decoding of the XML that is
> > being streamed to me. One of the XML messages generates the following
> > error:
> >
> > (, UnicodeEncodeError('ascii',
> > u'10000[\xb5s]\n', 15, 16, 'ordinal not in
> > range(128)'), )
> >
> > The offending character is the micro symbol for ten thousand
> > microseconds. I had a very similar problem with Java until I defined the
> > correct encoding with -Dfile.encoding=iso-8859-1. I know Python is not
> > Java, but is there a similar thing to do with Python? Do I have to find
> > where the strings are being decoded in the generateDS generated code and
> > change it there?
> >
> > Anyway, this seemed like the place to start and I will branch out from
> > there. Thanks.
> 
> Where in your generated code does this error occur?  Is it in one of the 
> export
> methods?  If so, you might consider looking at the generateExportXXX functions
> in generateDS.py, for example:
> 
> - generateExportFn, generateExportFn_1, ...
> - generateExportAttributes
> - generateExportChildren
> - generateExportLiteralFn, ...
> 
> Or, does the error occur while generateDS.py itself is running?
> 
> - Dave
> 
> --
> 
> Dave Kuhlman
> http://www.rexx.com/~dkuhlman
-- 
Al Niessner
818.354.0859

All opinions stated above are mine and do not necessarily reflect those
of JPL or NASA.

--------
|  dS  | >= 0
--------



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to