Posted By: Grat
Python bridge - dll error - 08/04/19 11:20
Hi,
I trying the python bridge, but I cannot call the function in python script.
a) PythonTest.c is OK
PythonTest compiling........... ok
Python Version: 3.68
Returned: 0 10 20 30 40
Sum: 100
b) init for script - Ok
c) fce where I use
d) error from PyError
Traceback (most recent call last):
File "<string>", line 7, in <module>
File "e:\conda\lib\site-packages\zmq\__init__.py", line 42, in <module>
_load_libzmq()
File "e:\conda\lib\site-packages\zmq\__init__.py", line 9, in _load_libzmq
import sys, ctypes, platform, os
File "e:\conda\lib\ctypes\__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: DLL load failed: %1 nen� platn� aplikace typu Win32.
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'Main' is not defined
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
source code python in att
( note: is not possible attach to script with extension .py )
maybe is a problem 64/32 bit installation of python, becouse manual say: Install Python 3.6.8 32 bit for Windows
I trying the python bridge, but I cannot call the function in python script.
a) PythonTest.c is OK
Quote
PythonTest compiling........... ok
Python Version: 3.68
Returned: 0 10 20 30 40
Sum: 100
b) init for script - Ok
Code
//-------- INT RUN ----------------------- if (is(INITRUN)){ #ifdef _0MQ if(!pyStart("../source/python/beta_sendK.py",1)) { printf("\nError - Python won't start!"); return; } #endif }
c) fce where I use
Code
//--------------------- 0MQ -> API ------------------------------------------------- void sendTo(string cPom){ #ifdef _0MQ string xSend=strf("Main('%s')",cPom); printf("\n Test: %s",xSend ); pyX(xSend); int nRet=pyInt("retMsg"); if (nRet==1) printf("\nNew predict send OK"); else if (nRet==2) printf("\nNew predict is duplicate"); else if (nRet==0) printf("\n0QM - undefined error"); else printf("\n0QM - no send - will never seing"); #endif }
d) error from PyError
Quote
Traceback (most recent call last):
File "<string>", line 7, in <module>
File "e:\conda\lib\site-packages\zmq\__init__.py", line 42, in <module>
_load_libzmq()
File "e:\conda\lib\site-packages\zmq\__init__.py", line 9, in _load_libzmq
import sys, ctypes, platform, os
File "e:\conda\lib\ctypes\__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: DLL load failed: %1 nen� platn� aplikace typu Win32.
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'Main' is not defined
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
SystemError: g:\a\3\s\objects\longobject.c:404: bad argument to internal function
source code python in att
( note: is not possible attach to script with extension .py )
maybe is a problem 64/32 bit installation of python, becouse manual say: Install Python 3.6.8 32 bit for Windows