https://issues.apache.org/ooo/show_bug.cgi?id=122829

            Bug ID: 122829
        Issue Type: DEFECT
           Summary: python ctypes library fails to import
           Product: App Dev
           Version: AOO 4.0.0
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: scripting
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The following example Python code demonstrates the problem:
#!/usr/bin/python
import ctypes

def test():
    pass

g_exportedScripts = test,

Running this from "Tools -> My Macros" gives an ImportError: type_ctypes.Union
is unknown.

I have AOO 4.0 (just upgraded from AOO 3.4.1) and LO 4.0 installed on my Win8
machine.  Until the upgrade, there was no problem using the ctypes library.

The full error message:

A Scripting Framework error occurred while running the Python script
vnd.sun.star.script:1.py$test?language=Python&location=user.

Message:<type 'exceptions.ImportError'>: type_ctypes.Union is unknown
C:\Program Files\OpenOffice 4\program\uno.py:282 in function _uno_import()
[raise ImportError("type "+ name + "." + x + " is unknown")]
C:\Program Files\OpenOffice
4\program\python-core-2.7.5\lib\ctypes\__init__.py:10 in function <module>()
[from _ctypes import Union, Structure, Array]
C:\Program Files\OpenOffice 4\program\uno.py:244 in function _uno_import()
[return _g_delegatee(name, *optargs, **kwargs)]
C:\Users\Jim\AppData\Roaming\OpenOffice\4\user\Scripts\python\1.py:2 in
function <module>() [import ctypes]
C:\Program Files\OpenOffice 4\program\pythonscript.py:440 in function
getModuleByUrl() [exec(code, entry.module.__dict__)]
C:\Program Files\OpenOffice 4\program\pythonscript.py:981 in function
getScript() [mod = self.provCtx.getModuleByUrl(fileUri)]

Does anyone else experience this error?  If it is a problem unique to my
installation then this is only an annoyance.  If not, then my extension will no
longer work for other people to use, which would be a bigger problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Reply via email to