[Libreoffice-bugs] [Bug 36192] New: uno.py: Several attributes missing from StarDesktop object using DEB packages from LibO website
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Apr 12 18:49:52 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=36192
Summary: uno.py: Several attributes missing from StarDesktop
object using DEB packages from LibO website
Product: LibreOffice
Version: LibO 3.3.2 release
Platform: All
OS/Version: Linux (All)
Status: NEW
Severity: critical
Priority: medium
Component: Spreadsheet
AssignedTo: libreoffice-bugs at lists.freedesktop.org
ReportedBy: kishanbhat at ymail.com
Description:
I have python scripts that import uno module and connect to the soffice
headless instance, open my spreadsheets, and get data from it. I used Danny's
OOo lib modules to setup the interface.
This worked fine in OpenOffice and then LibreOffice builds from Ubuntu PPA.
But now on my Lubuntu 11.04 (where no OpenOffice is installed), I installed all
the DEB packages that were part of the archive from the LibO website. Now my
python script connects to uno, but loading a spreadsheet fails pointing to:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: loadComponentFromURL
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 57, in
apport_excepthook
from apport.fileutils import likely_packaged
File "/opt/libreoffice/basis3.3/program/uno.py", line 291, in _uno_import
raise ImportError( "type "+ name + "." +x + " is unknown" )
ImportError: type apport.fileutils.likely_packaged is unknown
Original exception was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: loadComponentFromURL
So, I tried again with ubuntu 10.04 which has python 2.6.6, even there I get an
error:
AttributeError: loadComponentFromURL
Steps:
1. This is what I do in a python console:
Python 2.7.1+ (r271:86832, Mar 24 2011, 00:39:14)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import uno
>>> oLocalContext = uno.getComponentContext()
>>> oLocalResolver =
oLocalContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
oLocalContext )
>>> oContext = oLocalResolver.resolve(
"uno:socket,host=127.0.0.1,port=2002;urp;StarOffice.ComponentContext" )
>>> goServiceManager = oContext.ServiceManager
>>> StarDesktop = goServiceManager.createInstance(
"com.sun.star.frame.Desktop")
>>> dir(StarDesktop)
['ActiveFrame', 'DispatchRecorderSupplier', 'ImplementationId',
'ImplementationName', 'IsPlugged', 'PropertySetInfo',
'SupportedServiceNames', 'SuspendQuickstartVeto', 'Title', 'Types',
'addEventListener', 'addPropertyChangeListener',
'addVetoableChangeListener', 'dispose', 'disposing', 'getImplementationId',
'getImplementationName', 'getPropertySetInfo', 'getPropertyValue',
'getSupportedServiceNames', 'getTypes', 'handle', 'queryInterface',
'removeEventListener', 'removePropertyChangeListener',
'removeVetoableChangeListener', 'setPropertyValue', 'supportsService']
2. The same steps on OpenOffice/LibreOffice from ubuntu ppa shows me the
attribute "loadComponentFromURL", this attribute seems vital to opening files
using soffice headless.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list