ctypes version mismatch

Anyone have anything to suggest on this error:

{{{
Traceback (most recent call last):
   File "shutter_studio.py", line 41, in <module>
   File "App.pyo", line 25, in <module>
   File "ui\__init__.pyo", line 23, in <module>
   File "ui\FrmProductionOrders.pyo", line 10, in <module>
   File "ui\PagEditProductionOrders.pyo", line 8, in <module>
   File "ui\GrdProductionOrderOpenings.pyo", line 5, in <module>
   File "ui\DlgEditProductionOrderOpening.pyo", line 17, in <module>
   File "ui\ShutterCanvas.pyo", line 9, in <module>
   File "wx\lib\floatcanvas\FloatCanvas.pyo", line 6, in <module>
   File "numpy\__init__.pyo", line 46, in <module>
   File "numpy\ctypeslib.pyo", line 9, in <module>
   File "ctypes\__init__.pyo", line 20, in <module>
Exception: ('Version number mismatch', '1.0.2', '1.0.3')
}}}

I just updated from python 2.5.1 to 2.5.2, and wxPython 2.8.7.1 to
2.8.8.1. The issue is only in the py2exe-built app, not when running the
script from the command line.

Paul

Hi,

···

On Fri, Aug 29, 2008 at 10:26 PM, Paul McNett p@ulmcnett.com wrote:

Anyone have anything to suggest on this error:

{{{

Traceback (most recent call last):

File “shutter_studio.py”, line 41, in

File “App.pyo”, line 25, in

File “ui_init_.pyo”, line 23, in

File “ui\FrmProductionOrders.pyo”, line 10, in

File “ui\PagEditProductionOrders.pyo”, line 8, in

File “ui\GrdProductionOrderOpenings.pyo”, line 5, in

File “ui\DlgEditProductionOrderOpening.pyo”, line 17, in

File “ui\ShutterCanvas.pyo”, line 9, in

File “wx\lib\floatcanvas\FloatCanvas.pyo”, line 6, in

File “numpy_init_.pyo”, line 46, in

File “numpy\ctypeslib.pyo”, line 9, in

File “ctypes_init_.pyo”, line 20, in

Exception: (‘Version number mismatch’, ‘1.0.2’, ‘1.0.3’)

}}}

I just updated from python 2.5.1 to 2.5.2, and wxPython 2.8.7.1 to

2.8.8.1. The issue is only in the py2exe-built app, not when running the

script from the command line.

Paul

I’ve seen this before. The solution would be, it seems, to re-install py2exe after the upgrade from python 2.5.1 to 2.5.2.

You don’t have to upgrade py2exe, just reinstall it.

Does that work for you?

Regards,

–Tim

Tim van der Leeuw wrote:

Hi,

    Anyone have anything to suggest on this error:

    {{{
    Traceback (most recent call last):
     File "shutter_studio.py", line 41, in <module>
     File "App.pyo", line 25, in <module>
     File "ui\__init__.pyo", line 23, in <module>
     File "ui\FrmProductionOrders.pyo", line 10, in <module>
     File "ui\PagEditProductionOrders.pyo", line 8, in <module>
     File "ui\GrdProductionOrderOpenings.pyo", line 5, in <module>
     File "ui\DlgEditProductionOrderOpening.pyo", line 17, in <module>
     File "ui\ShutterCanvas.pyo", line 9, in <module>
     File "wx\lib\floatcanvas\FloatCanvas.pyo", line 6, in <module>
     File "numpy\__init__.pyo", line 46, in <module>
     File "numpy\ctypeslib.pyo", line 9, in <module>
     File "ctypes\__init__.pyo", line 20, in <module>
    Exception: ('Version number mismatch', '1.0.2', '1.0.3')
    }}}

    I just updated from python 2.5.1 to 2.5.2, and wxPython 2.8.7.1
    <http://2.8.7.1> to
    2.8.8.1 <http://2.8.8.1>. The issue is only in the py2exe-built app,
    not when running the
    script from the command line.

    Paul

I've seen this before. The solution would be, it seems, to re-install py2exe after the upgrade from python 2.5.1 to 2.5.2. <http://2.5.2.>

You don't have to upgrade py2exe, just reinstall it.

Does that work for you?

No, that didn't work. However, the problem seemed to be in numpy. It apparently ships with its own copy of ctypes, and something in py2exe decided to pull the dll from numpy's ctypes lib and the .pyo from python 2.5.2's ctypes lib, resluting in a version mismatch. Upgrading numpy seems to have resolved it.

Thanks!

Paul

···

On Fri, Aug 29, 2008 at 10:26 PM, Paul McNett <p@ulmcnett.com > <mailto:p@ulmcnett.com>> wrote: