issue with struct.unpack

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Aug 25 15:12:13 EDT 2012


On 25/08/2012 19:34, 9bizy wrote:
> I am trying to unpack values from sensor data I am retrieving through a serial cable, but I get errors while using struct.unpack, how can I use struct.unpack to unload the data in a readable format?
>
> I checked the python documentation for struct and I can seen to find any argument for this.
>
> I have data = struct.unpack('char',data) but I still get errors
>

We have two options here.  Either

a) People reading your original request go on a mind reading course or 
similar in an attempt to find out what the errors are, though I'm 
confused as to how you get errors from one line of code.

Or

b) Provide the smallest sample of code that allows the problem to be 
reproduced together with the complete traceback so we can see exactly 
what happened.

-- 
Cheers.

Mark Lawrence.




More information about the Python-list mailing list