"<class 'typeerror'>: don't know how to convert" error

All other Source.Python topics and issues.
GB14
Junior Member
Posts: 1
Joined: Mon Feb 28, 2022 6:27 am

"<class 'typeerror'>: don't know how to convert" error

Postby GB14 » Mon Feb 28, 2022 6:32 am

Hi,
I have a .c library which I want to use through my python code. The c function that I am calling is:

Code: Select all

crc32Word(uint32_t crc, const void *buffer, uint32_t size)


But when I write in my python code as follows:

Code: Select all

for x in range(1):
            spi.xfer2(data)
            values = struct.unpack("<" +"I"*256, bytes(data))
            C = crc.crc32Word(0xffffffff,data,1024)

I get error as

Code: Select all

<class 'typeerror'>: don't know how to convert parameter 2
. Can anybody help how can I solve this issue? Thank you.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 32 guests