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

Added utf-8 decode to byte string response #3

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

BMannell
Copy link
Contributor

I was getting the following error when trying to use the client.

Traceback (most recent call last):
  File "recipe.py", line 39, in <module>
    beam_intrinsics = json.loads(os1.get_beam_intrinsics())
  File "/home/ben/.pyenv/versions/3.5.7/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

I added the decode function to the response and it seems to have resolved the issue.

Python: 3.5.7
Firmware: 1.12

@rsiemens
Copy link
Owner

Thanks for the PR @BMannell!

@rsiemens rsiemens merged commit 89513ee into rsiemens:master Jul 22, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants