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

Can not use Chinese Characters when using Use the new Stata Jupyter kernel with Atom's Hydrogen package #98

Closed
LulinS opened this issue Sep 12, 2018 · 4 comments

Comments

@LulinS
Copy link

LulinS commented Sep 12, 2018

When my code contains Chinese Characters, it always reports: UnicodeEncodeError: 'ascii' codec can't encode characters in position 43-44: ordinal not in range(128)
Full message:

[IPKernelApp] ERROR | Exception in message handler: Traceback (most recent call last): File "/Applications/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell handler(stream, idents, msg) File "/Applications/anaconda3/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399, in execute_request user_expressions, allow_stdin) File "/Applications/anaconda3/lib/python3.6/site-packages/stata_kernel/kernel.py", line 81, in do_execute text_to_run, md5, text_to_exclude=text_to_exclude) File "/Applications/anaconda3/lib/python3.6/site-packages/stata_kernel/stata_session.py", line 186, in do self.child.sendline(text) File "/Applications/anaconda3/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 555, in sendline return self.send(s + self.linesep) File "/Applications/anaconda3/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 543, in send self._log(s, 'send') File "/Applications/anaconda3/lib/python3.6/site-packages/pexpect/spawnbase.py", line 126, in _log self.logfile.write(s) UnicodeEncodeError: 'ascii' codec can't encode characters in position 43-44: ordinal not in range(128)

@kylebarron
Copy link
Owner

Can you post this on the issues for the stata_kernel repository here instead:
https://github.com/kylebarron/stata_kernel/issues/new?template=bug_report.md

Thanks

kylebarron pushed a commit to kylebarron/stata_kernel that referenced this issue Sep 12, 2018
@kylebarron
Copy link
Owner

I think this is the same error as pexpect/pexpect#516.

@kylebarron
Copy link
Owner

@LulinS Can you try upgrading to the new version of the package?

pip install stata_kernel --upgrade

@LulinS
Copy link
Author

LulinS commented Sep 12, 2018

@LulinS Can you try upgrading to the new version of the package?

pip install stata_kernel --upgrade

You guys are so great! I have upgraded to the new version of the package, and partly solved the problem. But there is a still a small bug. I will report this on the issues for the stata_kernel repository.

Thanks!

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

2 participants