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

Spyder fails to launch because of Unicode errors in create_kernel_spec #3553

Closed
eunsoo opened this issue Oct 18, 2016 · 6 comments
Closed

Spyder fails to launch because of Unicode errors in create_kernel_spec #3553

eunsoo opened this issue Oct 18, 2016 · 6 comments

Comments

@eunsoo
Copy link

eunsoo commented Oct 18, 2016

Spyder Launch Error

When I run spyder on command line, I got error message like below.

Traceback (most recent call last): File
"/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 2998, in main
mainwindow = run_spyder(app, options, args) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 2902, in run_spyder
main.setup() File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1153, in setup
self.setup_layout(default=False) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1414, in setup_layout
self.setup_default_layouts('default', settings) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py",
line 1593, in setup_default_layouts
widget.toggle_view(True) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 677, in toggle_view
self.create_new_client(give_focus=False) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 886, in create_new_client
self.connect_client_to_kernel(client) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 903, in connect_client_to_kernel
km, kc = self.create_kernel_manager_and_kernel_client(connection_file) File
"/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 1276, in create_kernel_manager_and_kernel_client
kernel_manager._kernel_spec = self.create_kernel_spec() File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py",
line 1256, in create_kernel_spec
uv = to_text_string(v) File "/home/park/anaconda2/lib/python2.7/site-packages/spyder/py3compat.py",
line 136, in to_text_string
return unicode(obj) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 73: ordinal not in range(128)

I have tried

  1. Reinstall using "pip install spyder"
  2. Reinstall using "conda install spyder"
  3. On the command line "spyder --reset"

Version Information(

  • Spyder Version: 3.0
  • Python Version: 2.7.12
  • Operating system: Ubuntu 14.04
  • Anaconda Version : 4.2.0

How do I fix it. If you give me some ideas, I can really appreciate for this.

Thanks.

@jitseniesen
Copy link
Member

@eunsoo, as was asked on #3127, could you please include the output of running

printenv

in a terminal (i.e. in bash or zsh :-) For some reason, a non-ascii character (perhaps Hangul) has crept in.

If you can switch to Python 3, that might turn out to help, as Python 3 is generally better with non-ascii characters.

@ccordoba12 ccordoba12 added this to the v3.0.2 milestone Oct 18, 2016
@ccordoba12 ccordoba12 changed the title Spyder Launch Error Spyder fails to launch because of Unicode errors in create_kernel_spec Oct 22, 2016
@ccordoba12
Copy link
Member

@mariacamilaremolinagutierrez, please work on this one. To reproduce it, please create a conda environment with all Spyder dependencies in a directory with non-ascii chars (e.g. /tmp/añño), and run Spyder from it.

I think that would reproduce this problem, but if not, please let me know about it :-)

@mariacamilarg
Copy link
Contributor

@ccordoba12 I was not able to reproduce the error, I was trying several configurations. But only until now I realized all this time I was using python 3.5, so I am going to install it again with python 2.7

@ccordoba12
Copy link
Member

Ok, thanks :-)

@mariacamilarg
Copy link
Contributor

I was able to reproduce it by naming the conda environment with a non-ascii character:

image

I will find out later today how to fix that

@ccordoba12
Copy link
Member

This means that Python itself doesn't even work when installed in a non-ascii dir on Unix systems, but that's not directly related to the original problem :-/

We'll discuss about this in our meeting, please work on your other issue instead :-)

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

No branches or pull requests

4 participants