ctypes version mismatch

P

Paul McNett

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
 
T

Thomas Heller

Paul said:
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.

I guess you should remove the build and dist directories and rebuild
your app - this is always a good idea when something goes wrong, not only
after upgrading Python or Python packages.

Thomas
 
P

Paul McNett

Thomas said:
I guess you should remove the build and dist directories and rebuild
your app - this is always a good idea when something goes wrong, not only
after upgrading Python or Python packages.

Thanks for responding (and thanks for starting py2exe!). Yes, my build
script always wipes out the build and dist directories first.

The problem turned out to be (it was right there in the traceback, but I
glossed over it at first) that numpy includes their own ctypeslib, and
*that* version was 1.0.2. Now, I'm still not sure why it mattered in the
exe but not running just the script, but upgrading numpy resolved the issue.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top