Problem importing uno from another python version

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
sgeulette
Posts: 1
Joined: Mon Sep 15, 2008 12:35 pm
Location: Belgium

Problem importing uno from another python version

Post 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.
LibreOffice 3.3.4 on Ubuntu 11.04 + windows XP
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem importing uno from another python version

Post 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
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply