参数1:<class'typeerror'=“”>:错误的类型

时间:2019-04-18 11:22:32

标签: python typeerror

我正在尝试运行以下代码,并且在dll中,它定义为

(unsigned char * ReadAndWriteToDevice(unsigned char InputReport1,unsigned     char OutputReport1,int DevDet);)

adcdll = cdll.LoadLibrary("adcDLL1.dll")

When I run this code, 

DvDetect = c_ubyte(0)
adcdll.DevDetect(pointer(DvDetect))

OutputReport1 = numpy.ndarray(shape=70, dtype= 'B')
InputReport1 = numpy.ndarray(shape=70, dtype= 'B')

adcdll_ReadAndWriteToDevice = adcdll.ReadAndWriteToDevice
adcdll_ReadAndWriteToDevice.argtypes = [c_char_p,c_char_p, c_int]
adcdll_ReadAndWriteToDevice.restype = c_char_p

OutputReport1[1] = 0xF1
adcdll.ReadAndWriteToDevice(InputReport1,OutputReport1,1)


It give me the error
argument 1: <class 'TypeError'>: wrong type

0 个答案:

没有答案