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

Kernel dies and can't report errors because of failure to read stderr file #4191

Closed
waranzkomodom opened this issue Feb 22, 2017 · 4 comments

Comments

@waranzkomodom
Copy link

Description of your problem

Hi, I am a very inexperienced user, I launched spyder to learn write one of my first, very simple programs, but i repeatedly, once each several seconds, get message:

WARNING:traitlets:kernel died: 3.0
Traceback (most recent call last):
File "C:\Users\Wojtek\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\client.py", line 357, in kernel_restarted_message
stderr = codecs.open(self.stderr_file, 'r', encoding='utf-8').read()
File "C:\Users\Wojtek\Anaconda2\lib\codecs.py", line 686, in read
return self.reader.read(size)
File "C:\Users\Wojtek\Anaconda2\lib\codecs.py", line 492, in read
newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbf in position 2136: invalid start byte

What steps will reproduce the problem?

  1. It happens just after opening spyder
  2. It keeps turning to internal console to show this message, so i'm in fact unable to use spyder

What is the expected output? What do you see instead?

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.1.3
  • Python Version: 2.7
  • Qt Version: 5.6.2
  • PyQt Version: 5.6.0
  • Operating system: windows 7

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

jedi =0.9.0 : 0.9.0 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.3 (OK)
pandas >=0.13.1 : 0.19.2 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.5.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12 ccordoba12 modified the milestones: v3.1.4, v3.2 Feb 22, 2017
@ccordoba12
Copy link
Member

ccordoba12 commented Feb 23, 2017

It seems the console is failing with an error message that contains characters that are not Unicode symbols.

Unicode is the standard for international characters, but I don't know how's that handled on non-English versions of Windows.

I'm very sorry, but I really don't know how to help you for now.

@ccordoba12 ccordoba12 changed the title kernel dies just after turning spyder on Kernel dies and can't report errors because of failure to read stderr file Feb 27, 2017
@waranzkomodom
Copy link
Author

Hi, thx very much for your response. My teacher managed to figure out how to overcome problem with encoding and make spyder show the actual error.
It was enough to subsitute "utf-8" with "cp437" in this line "stderr = codecs.open(self.stderr_file, 'r', encoding='utf-8').read()".
I'm using windows in polish.

Cheers!

@ccordoba12 ccordoba12 modified the milestones: v3.1.4, v3.2 Feb 28, 2017
@ccordoba12
Copy link
Member

I was also thinking that was the problem. Thanks for letting us know about it :-)

@ccordoba12
Copy link
Member

@dalthviz, this is the bug I talked you about.

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

3 participants