Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Retroman445 opened this issue Mar 9, 2021 · 2 comments

Comments

@Retroman445
Copy link

Retroman445 commented Mar 9, 2021

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)

@DavidGoedicke
Copy link

Just made a pull request to address this issue.

See #54 .

@goldyfruit
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants