Hi,
what is your environment (which version, is it an official binary build
or did you build on your system, do you use the system python or the
python coming with the office)?
Bye,
Joerg
Michele Petrazzo wrote:
Hi list,
I'm trying the ooextract.py script find on python-bridge page. It work
well, but when an exception is raised (for example that say that OOo
aren't listening), I receive a python error:
"""
michele:~$ python tmp/test_uno.py --pdf test.sxw
Traceback (most recent call last):
sys.stderr.write( "Error ("+repr(e.__class__)+") :" + e.Message +
"\n" )
UnicodeEncodeError: 'ascii' codec can't encode characters in position
83-106: ordinal not in range(128)
michele:~$
"""
Why this happen? OOo pass an "illegal" string to python?
I solve this with:
e.Message.encode('ascii', 'replace')
and receive a more or less human-readable python exception:
Error (<class __main__.com.sun.star.connection.NoConnectException at
0x4028214c>) :????????????????????????Q??)??P
Is there a solution for make this exception readable?
Thanks a lot,
Michele
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]