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

Ascii bug #60

Open
andygithubchen opened this issue Sep 23, 2018 · 0 comments
Open

Ascii bug #60

andygithubchen opened this issue Sep 23, 2018 · 0 comments

Comments

@andygithubchen
Copy link

andygithubchen commented Sep 23, 2018

Error:
Traceback (most recent call last):
File "/usr/local/bin/schemasync", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/schemasync/schemasync.py", line 356, in main
sys.exit(parse_cmd_line(app)())
File "/usr/local/lib/python2.7/dist-packages/schemasync/schemasync.py", line 140, in processor
sync_comments=options.sync_comments))
File "/usr/local/lib/python2.7/dist-packages/schemasync/schemasync.py", line 258, in app
p_buffer.write(patch + '\n')
File "/usr/local/lib/python2.7/dist-packages/schemasync/utils.py", line 124, in write
self._buffer.write(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 172-173: ordinal not in range(128)

Fix:
import sys
reload(sys)
sys.setdefaultencoding('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

No branches or pull requests

1 participant