Menu

#21 import clr crash on openoffice python

open
nobody
None
5
2014-08-19
2012-07-28
lvl
No

When using python for .net from Openoffice, a crash occurs on import clr.
The python module is called by "C:\Program Files\OpenOffice.org 3\program\soffice.exe" -nologo "vnd.sun.star.script:module.py$fonc?language=Python&location=user"

The module.py is in the user directory : C:\Documents and Settings\username\Application Data\OpenOffice.org\3\user\Scripts.
It contains :

import clr

def fonc(Arg1 = "-nothing-"):

pass

g_exportedScripts = fonc,

Discussion

  • lvl

    lvl - 2012-07-29

    More simple :
    Apache OpenOffice 3.4 hangs when a python module containing 'import clr' is executed from the menu Tools - Macros - execute Python.

     
  • Barton Cline

    Barton Cline - 2012-07-29

    "Openoffice", really, perhaps "Apache OpenOffice (Incubating)" or, more commonly "libreoffice"?
    Please provide version an platform info. Thnaks.

     
  • Barton Cline

    Barton Cline - 2012-07-29

    Yes. You've done that (wacky interface that doesn't show comments by default).
    Have a look at
    http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=54285
    Make sure that the interpreter running is 2.7 max and you have built or downloaded the matching version.

     
  • lvl

    lvl - 2012-07-30

    My configuration is Windows XP.
    The python used is 2.6.1 (which is the version embedded in OO3.4).
    I downloaded the source of pythonnet on sourceforge (the compiled version in pythonnet-2.0-alpha2-clr2.0_py26 did not work on my configuration), and compiled the Python.Runtime solution found in trunk\pythonnet\src\runtime with Visual C# 2010 Express (parameters : PYTHON26,UCS2).
    I copied the files clr.pyd and Python.Runtime.dll to the same python directory Lib.
    The 'import clr' works when python is invoked directly, but when it is run from inside OO it hangs OO with no error message.
    This problem occurs with the python2.6 embedded in OO and with the system python2.6 which can be used after modifying some environmental variables (your link deals with this topic).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.