(I have only had this happen with an improper DLL for the main Python executable, don't know about extension modules) The problem is, these errors tend to happen to the main Python executable, as it's code and the code contained in shared libraries are being loaded into memory. Because of this, there is no easy way to catch these errors, as they happen *before* Python is fully initialized and running. The only way I can think of to fix this would be to have a pre-script or program run the Python executable as a subprocess, and analyze stdout for these errors. Another solution would be to have a troubleshooting page at python.org explaining these errors. "The trouble with having an open mind, of course, is that people will come along and insist of putting things in it." - Terry Pratchett I don't really know C. At all. I was thinking the errors could be caught at a higher level, something like(the code isn't runnable): except windowserror as ex: if ex.string == '%1 is not...: raise_error_here Guido van Rossum <guido@python.org> wrote:
Do you know how to fix this?
On Sunday, August 4, 2013, Ryan wrote:
Here are my experiences in accidently getting a .so/.dll file for the wrong chip/CPU type:
Windows:
%1 is not a valid Win32 application
*nix/Android:
A long message about improper memory mappings and such.
I'd like to propose the concept of better errors in these cases. Both Windows and Posix errors is this case are horrible, and it'd be nice for them to actually be written in English. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-- Sent from my Android phone with K-9 Mail. Please excuse my brevity. _______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas