Python Macro oxt

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
matmir
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Python Macro oxt

Post by matmir »

Hello,
I've created an extension oxt for LibreOffice, in python.
If I execute this macro in writer, it is all ok, but if I execute after installation of my oxt, this is the error:

Errore dello schema di scripting durante l'esecuzione dello script Python vnd.sun.star.script:NewMacro-L-1.3.oxt|python|ProvaUno.py$info?language=Python&location=user:uno_packages.

Messaggio: <class 'KeyError'>: 'NewMacro-L-1.3.oxt'
File "C:\Program Files\LibreOffice\program\pythonscript.py", line 1037, in getScript
self.provCtx.uriHelper.getStorageURI(scriptUri) );
File "C:\Program Files\LibreOffice\program\pythonscript.py", line 407, in getStorageUrlFromPersistentUrl
package = self.mapPackageName2Path[ packageName ]


Can someone help me please?
thanks...
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
User avatar
Zizi64
Volunteer
Posts: 10431
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Python Macro oxt

Post by Zizi64 »

We can not help without the macro code and the extension...
Tibor Kovacs, Hungary; LO6.1.6, 6.4.7 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.1.1;AOO4.1.9
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
matmir
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Re: Python Macro oxt

Post by matmir »

I've attached the file oxt.
and the file python.
Attachments
NewMacro-L-1.3.oxt
(50.28 KiB) Downloaded 211 times
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
matmir
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Re: Python Macro oxt

Post by matmir »

this is the content of python file:
 Edit: Text extracted and inserted into attached file python.txt, to shorten posting. It may need editiog to conform to normal python formatting standards. [RoryOF, Moderator] 
Attachments
python.txt
(9.77 KiB) Downloaded 231 times
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
User avatar
Villeroy
Volunteer
Posts: 30611
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Python Macro oxt

Post by Villeroy »

A self-explaining installer template and an installer document with your code.
Attachments
topic_99373.py.odt
Topic's Python code in the installer template
(26.85 KiB) Downloaded 225 times
Dump2Profile.ott
Template to dump text files (i.e. macros) to the user profile. Contains some StarBasic code.
(17.02 KiB) Downloaded 238 times
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