usb_4_mic_array icon indicating copy to clipboard operation
usb_4_mic_array copied to clipboard

Tuning.py (AttributeError: 'array.array' object has no attribute 'tostring')

Open Retroman445 opened this issue 4 years ago • 2 comments

Running tuning.py gives me this error.

Traceback (most recent call last):
  File "tuning.py", line 197, in <module>
    main()
  File "tuning.py", line 181, in main
    print('{:24} {}'.format(name, dev.read(name)))
  File "tuning.py", line 109, in read
    response = struct.unpack(b'ii', response.tostring())
AttributeError: 'array.array' object has no attribute 'tostring'

Solved it by changing this line

response = struct.unpack(b'ii', response.tostring())

to this

response = struct.unpack(b'ii', response)

Retroman445 avatar Mar 09 '21 13:03 Retroman445

Just made a pull request to address this issue.

See #54 .

DavidGoedicke avatar Jun 06 '21 06:06 DavidGoedicke

I got the same issue, and @DavidGoedicke's PR worked for me.

goldyfruit avatar Feb 01 '22 23:02 goldyfruit