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

Fix enconding #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix enconding #1

wants to merge 1 commit into from

Conversation

NorDroN
Copy link

@NorDroN NorDroN commented May 24, 2019

Hi!

When I start this script:

python ./example.py mon <device_id>

I'll get error:

Traceback (most recent call last):
  File "example.py", line 267, in <module>
    example(sys.argv[1:])
  File "example.py", line 263, in example
    json.dump(state, f, ensure_ascii = False)
  return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2103' in position 16: character maps to <undefined>

I think you should write data with 'utf-8'.

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.

2 participants