[WinError 193] %1 is not a valid Win32 application - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: [WinError 193] %1 is not a valid Win32 application (/thread-537.html) Pages:
1
2
|
[WinError 193] %1 is not a valid Win32 application - Zest - Oct-17-2016 Hello people, I am pretty new at working with python and I am encoutering the error as stated in the subject. Full error: I have already googled it and many answers say it is a bit 32bit vs 64bit issue. However I don't know what the problem would be :huh: I use a 32bit eclipse with PyDev plugin I have python 3.5 (32 bits) Windows 7 Is there anything else that should be 32bits? Any help is appreciated :-) RE: [WinError 193] %1 is not a valid Win32 application - sparkz_alot - Oct-17-2016 What code are you trying to run? Note that Win32 does not indicate you are running 32 bit code, it is just a label indicating you are using a Windows platform RE: [WinError 193] %1 is not a valid Win32 application - metulburr - Oct-17-2016 try running the program from a command line/terminal. RE: [WinError 193] %1 is not a valid Win32 application - Zest - Oct-17-2016 what exactly do you mean with 32bit code? how can i check how many bits my code is? for a project i have been provided with a toolbox written in python and i'm trying to import a module from this toolbox (could this toolbox perhaps be 64bits? and if so how can i check?). i have placed all files in the same folder. RE: [WinError 193] %1 is not a valid Win32 application - sparkz_alot - Oct-17-2016 (Oct-17-2016, 09:38 PM)Zest Wrote: what exactly do you mean with 32bit code? how can i check how many bits my code is? When we ask for your code, it means the Python code you have written. :) You say you have a 'toolbox' and you are trying to import a module from it, so at the very least, your code will look like this import module_name # This is the name of the module you are trying to import # Here is you code that you've written to use that moduleAt this point, do not worry about 32 and 64 bit stuff. Where did you get the 'toolbox' from? RE: [WinError 193] %1 is not a valid Win32 application - Zest - Oct-17-2016 alright well the main class looks like this, nothing special, the toolbox was written and provided by someone I know and it isn't public so I should probably not be sharing that without permission :-/ import lib_pct_build_network if __name__ == '__main__': passis there anything you would like to know/see about the toolbox/library? RE: [WinError 193] %1 is not a valid Win32 application - snippsat - Oct-17-2016 (Oct-17-2016, 08:55 PM)Zest Wrote: I use a 32bit eclipse with PyDev pluginWhen say python 3.5 (32 bits) is this trough anaconda? Quote:File "C:\Users\Joan\Anaconda3\lib\ctypes\__init__.py", line 347, in __init__ The error message is because you mixing are 32-bit and 64-bit.
RE: [WinError 193] %1 is not a valid Win32 application - Zest - Oct-17-2016 i ran it in the terminal and a similar error happens: https://gyazo.com/d62c64801b849bbe9b5205f1e8dc2620 @snippsat, if it says so in the stack (the quote) then it must go through anaconda i think? i checked the python in anaconda and it is 32bits https://gyazo.com/930044477b5180cd65da09922eb4ebbc RE: [WinError 193] %1 is not a valid Win32 application - metulburr - Oct-17-2016 (Oct-17-2016, 10:10 PM)Zest Wrote: i ran it in the terminal and a similar error happens: Usually .so is a lib built under linux with the equivalent in windows a .dll. Is the person that gave you this "toolbox" running linux? RE: [WinError 193] %1 is not a valid Win32 application - Zest - Oct-17-2016 @metulburr, ahhh that could be the problem. so i'd just have to convert/recompile it to a .dll file and adjust the modules a bit right? now i just need to find out how to create the .dll files :) thanks Quote:Is the person that gave you this "toolbox" running linux?i don't know, seems probable |