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 errors in spyder.ini #3127

Closed
hamid-omid opened this issue Apr 20, 2016 · 7 comments
Closed

Spyder fails to launch because of errors in spyder.ini #3127

hamid-omid opened this issue Apr 20, 2016 · 7 comments
Milestone

Comments

@hamid-omid
Copy link

hamid-omid commented Apr 20, 2016

@ccordoba12

Description of your problem

What steps will reproduce the problem?

My spyder was working fine, I did an update on my linux and now it does not run at all. I installed it again and it does not run yet.

What is the expected output? What do you see instead?
I get this traceback:

Traceback (most recent call last):
File "/home/hamid/anaconda3/bin/spyder", line 2, in
from spyderlib import start_app
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/start_app.py", line 13, in
from spyderlib.config import CONF
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/config.py", line 736, in
subfolder=SUBFOLDER, backup=True, raw_mode=True)
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/userconfig.py", line 215, in init
self.load_from_ini()
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/userconfig.py", line 265, in load_from_ini
self.read(self.filename(), encoding='utf-8')
File "/home/hamid/anaconda3/lib/python3.5/configparser.py", line 696, in read
self._read(fp, filename)
File "/home/hamid/anaconda3/lib/python3.5/configparser.py", line 1012, in _read
for lineno, line in enumerate(fp, start=1):
File "/home/hamid/anaconda3/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 0: invalid continuation byte

Versions and main components

  • Spyder Version: 2.3.8
  • Python Version: 3.5
  • Operating system:Linux 15.10
@Nodd
Copy link
Contributor

Nodd commented Apr 21, 2016

Try spyder --reset. You'll lose your spyder config but it should fix your problem.

@hamid-omid
Copy link
Author

Gives me same error:

hamid@hamid-Lenovo-IdeaPad-U530-Touch:~$ spyder --reset
Traceback (most recent call last):
File "/home/hamid/anaconda3/bin/spyder", line 2, in
from spyderlib import start_app
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/start_app.py", line 13, in
from spyderlib.config import CONF
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/config.py", line 736, in
subfolder=SUBFOLDER, backup=True, raw_mode=True)
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/userconfig.py", line 215, in init
self.load_from_ini()
File "/home/hamid/anaconda3/lib/python3.5/site-packages/spyderlib/userconfig.py", line 265, in load_from_ini
self.read(self.filename(), encoding='utf-8')
File "/home/hamid/anaconda3/lib/python3.5/configparser.py", line 696, in read
self._read(fp, filename)
File "/home/hamid/anaconda3/lib/python3.5/configparser.py", line 1012, in _read
for lineno, line in enumerate(fp, start=1):
File "/home/hamid/anaconda3/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf7 in position 0: invalid start byte

Actually, I installed anaconda again and still getting the same error! iPython works though!

@ccordoba12
Copy link
Member

Then please do

rm -Rf ~/.spyder2-py3

and try again

@eunsoo
Copy link

eunsoo commented Oct 15, 2016

@ccordoba12 I have a similar problem. When I run spyder in command line, I got this message.

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)

My Error is UnicodeDecodeError related to 'ascii'. I tried your suggestion.
But I can not fix it.
Could you tell me how to fix it, if you have another solution?

@ccordoba12 ccordoba12 added this to the v3.1 milestone Oct 15, 2016
@ccordoba12 ccordoba12 changed the title Error laucnhing Spyder after updating linux Spyder fails to launch because of errors in spyder.ini Oct 15, 2016
@ccordoba12
Copy link
Member

@eunsoo, your problem is different. Please open a new issue about it and include the output of running

printenv

in a terminal (i.e. in bash or zsh :-)

@eunsoo
Copy link

eunsoo commented Oct 18, 2016

@ccordoba12
This is my result from printenv.

XDG_VTNR=7
LC_PAPER=en_US.UTF-8
ORBIT_SOCKETDIR=/tmp/orbit-park
SSH_AGENT_PID=2030
LC_ADDRESS=en_US.UTF-8
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/park
SELINUX_INIT=YES
LC_MONETARY=en_US.UTF-8
TERMINATOR_UUID=urn:uuid:fee25cf7-6076-4c4f-b086-5f71f722f364
IBUS_DISABLE_SNOOPER=1
CLUTTER_IM_MODULE=xim
GPG_AGENT_INFO=/run/user/1000/keyring-OBxHK0/gpg:0:1
TERM=xterm
SHELL=/bin/bash
SSH_AGENT_LAUNCHER=upstart
WINDOWID=39845892
LC_NUMERIC=en_US.UTF-8
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1973
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-OBxHK0
GTK_MODULES=overlay-scrollbar:unity-gtk-module
LC_ALL=en_US.UTF-8
CUDA_HOME=/usr/local/cuda
USER=park
LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/local/cuda/lib64/::/home/park/anaconda2/lib:/home/park/OpenBLAS
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:
LC_TELEPHONE=en_US.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/1000/keyring-OBxHK0/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
DESKTOP_SESSION=ubuntu
PATH=/home/park/anaconda2/bin:/usr/local/cuda/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
QT_IM_MODULE=ibus
QT_QPA_PLATFORMTHEME=appmenu-qt5
LC_IDENTIFICATION=en_US.UTF-8
PWD=/home/park/Dropbox/100.Projects/distillation_privileged_information
JOB=gnome-session
XMODIFIERS=@im=ibus
GNOME_KEYRING_PID=1969
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
LC_MEASUREMENT=en_US.UTF-8
UBUNTU_MENUPROXY=1
COMPIZ_CONFIG_PROFILE=ubuntu
IM_CONFIG_PHASE=1
PAPERSIZE=letter
GDMSESSION=ubuntu
SESSIONTYPE=gnome-session
SHLVL=2
HOME=/home/park
XDG_SEAT=seat0
LANGUAGE=en_US:en
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
PYTHONPATH=/home/park/keras:/home/park/SSD/caffe/python:/home/park/SSD/caffe/python:

UPSTART_EVENTS=started starting
LOGNAME=park
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ycCDUgRMAk
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
QT4_IM_MODULE=xim
LESSOPEN=| /usr/bin/lesspipe %s
CITYSCAPES_DATASET=/home/park/mnt/DBs/CityScape
INSTANCE=Unity
TEXTDOMAIN=im-config
UPSTART_JOB=unity-settings-daemon
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0
CAFFE_ROOT=/home/park/SSD/caffe
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=en_US.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
LC_NAME=en_US.UTF-8
XAUTHORITY=/home/park/.Xauthority
COLORTERM=gnome-terminal
_=/usr/bin/printenv

@waslinux
Copy link

@Nodd thank u!!! saved me!

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

5 participants