Ask Your Question

Python macros under Windows [closed]

asked 2014-08-21 19:36:33 +0200

freeo gravatar image

updated 2020-08-04 19:28:10 +0200

Alex Kemp gravatar image

I was trying to get a HelloWorld macro running under Windows 7 64 bit (German) with LO Every macro under "My Macros" fails with the following popup error message:

pyuno._createUnoStructHelper: member 'Context' of struct type '' not given a value.

LibreOffices builtin Macros do work, only my custom macros under \AppData\Roaming\LibreOffice\4\user\scripts\python dont work.

I enabled logging on the ERROR level, which gave me this output:

Thu Aug 21 19:07:04 2014 [ERROR] ScriptBrowseNode.getPropertyValue error <class ''>: pyuno._createUnoStructHelper: member 'Context' of struct type '' not given a value.
  C:\Program Files (x86)\LibreOffice 4\program\ in function _uno_struct__init__() [struct, used = pyuno._createUnoStructHelper(self.__class__.__pyunostruct__,args,**kwargs)]
  C:\Program Files (x86)\LibreOffice 4\program\ in function storageURI2ScriptUri() [raise RuntimeException( message )]
  C:\Program Files (x86)\LibreOffice 4\program\ in function getScriptURI() [return self.storageURI2ScriptUri(storageURI)]
  C:\Program Files (x86)\LibreOffice 4\program\ in function getPropertyValue() [self.provCtx.getPersistentUrlFromStorageUrl( self.uri + "$" + self.funcName ) )]

Just in case, I just installed JRE 8u20 before.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-02 22:17:28.126834


Try installing LO after the JRE. There are reports on this forum and elsewhere of an installation order of LO then Java causing problems. Seems unrelated to Python, but perhaps check this first.

oweng gravatar imageoweng ( 2014-08-22 07:41:56 +0200 )edit

I reinstalled LO again after JRE. This didn't change anything. But it's definitely a LO problem, I can execute the same python scripts with OO 4.1.1.

freeo gravatar imagefreeo ( 2014-08-26 15:38:28 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-09-16 20:40:03 +0200

kopiad gravatar image

Changing scripts to Scripts solved the issue for me. Change \AppData\Roaming\LibreOffice\4\user\scripts\python to \AppData\Roaming\LibreOffice\4\user\Scripts\python.

edit flag offensive delete link more

answered 2014-08-22 07:50:33 +0200

karolus gravatar image


I can't recall similar Error-messages,

only my custom macros under \AppData\Roaming\LibreOffice\4\user\scripts\python dont work.

what exacty dont work ?
do you get the Functionnames visible on the GUI ?
If not - recheck carefully your code for common but "invisible" Syntaxerrors, like tab-signs instead of 4 spaces, missing closing parenthesis, missing colons as last sign in Statement-lines etcpp.

Sorry in case my trivial hints dont help you !


edit flag offensive delete link more


The code is copied 1-to-1 from on official example. I simply moved it to the folder mentioned above. I just reinstalled LO as well. The message is a popup I get, as soon as I execute the script: I'd say that python support is simply broken in this particular version (newest right now) under Windows. What should I do next?

freeo gravatar imagefreeo ( 2014-08-22 13:51:20 +0200 )edit

Get the same error. Using LO on Win 7 x64. Is also using a copy of a LO included example that runs fine in the LO installation directory. Are we missing some path?

kopiad gravatar imagekopiad ( 2015-09-16 20:34:24 +0200 )edit

I encounter the same problem on Win 7 x64 as well...

Metazeta gravatar imageMetazeta ( 2016-08-01 12:18:28 +0200 )edit

Question Tools

1 follower


Asked: 2014-08-21 19:36:33 +0200

Seen: 3,273 times

Last updated: Aug 22 '14