Page 1 of 1

Problem importing uno from another python version

Posted: Mon Sep 15, 2008 2:27 pm
by sgeulette
Hi,

We run oo in server mode without gui (version 2.4 from ubuntu 8.04 packages, python distribution 2.5.2) to do conversion between formats (odt to pdf, doc, ...).
We use a python product (http://pypi.python.org/pypi/appy.pod) to generate odt documents and call oo to convert it if necessary. This python product is called in Zope/Plone web applications running on a compiled python (version 2.4.5).

This operation works well on my ubuntu laptop but not on my server where I have the following error :
Traceback (most recent call last): File "/srv/zinstances/test_appsites253/eggs/appy.pod-0.2.1-py2.4.egg/appy/pod/converter.py", line 20, in <module> import sys, os, os.path, time, signal ImportError: /srv/python2.4/lib/python2.4/lib-dynload/time.so: undefined symbol: Py_InitModule4
Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook from apport.packaging_impl import impl as packaging File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module> from apport.report import Report File "/usr/lib/python2.5/site-packages/apport/report.py", line 14, in <module> import subprocess, tempfile, os.path, urllib, re, pwd, grp, os, sys File "/srv/python2.4/lib/python2.4/subprocess.py", line 376, in <module> import select ImportError: /srv/python2.4/lib/python2.4/lib-dynload/select.so: undefined symbol: Py_InitModule4
Original exception was: Traceback (most recent call last): File "/srv/zinstances/test_appsites253/eggs/appy.pod-0.2.1-py2.4.egg/appy/pod/converter.py", line 20, in <module> import sys, os, os.path, time, signal ImportError: /srv/python2.4/lib/python2.4/lib-dynload/time.so: undefined symbol: Py_InitModule4
How can I resolve this problem ?

Thanks in advance.

Re: Problem importing uno from another python version

Posted: Mon Sep 15, 2008 2:53 pm
by Villeroy
Since that error does not mention uno, unohelper nor anything related to OpenOffice.org, I would suggest that you ask in a Python forum.
For further reference:
http://udk.openoffice.org/python/python-bridge.html#faq [Q7 and Q8]
http://udk.openoffice.org/python/python ... #replacing