I installed the DEB packages for ubuntu from
http://download.documentfoundation.org/libreoffice/stable/3.3.2/deb/x86/LibO_3.3.2_Linux_x86_install-deb_en-US.tar.gz
And now my python scripts that earlier connected to soffice headless to
interact with spreadsheets are broken:
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 opened up python console and tried to inspect a call to uno:
=====================
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']
=====================
I compare it with another setup to see several attributes are missing from
StarDesktop, the main one - *loadComponentFromURL*
Anyone faced similar problems?
Thanks in advance,
Kishan
--
Unsubscribe instructions: E-mail to users+help@libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
- [libreoffice-users] Python uno: missing attributes · Kishan Bhat
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.