[Pyobjc-dev] error:depythonifying 'charptr', got 'str'
Brought to you by:
ronaldoussoren
|
From: Liu A. <ld...@ou...> - 2021-06-18 12:10:33
|
Dear teams:
I am confused by this error:ValueError: depythonifying 'charptr', got ‘str’ for few days and cannot find the reason.
My pyobjc version is 7.3, macOS version is 10.15.7 and the objective-c function is below
// Function to read Test Device Register
-(BOOL) readRegisterAtAddress:(NSUInteger)address
withLength:(NSUInteger)length
data:(uint8_t *)data
error:(NSError **)error;
I used it in this way
data = '\x00'*4
device.device.readRegisterAtAddress_withLength_data_error_(0x1c, 4, data, None)
Can you help me to solve this issue.
Thank you very much.
Aubrey.Liu
发自我的iPhone |