question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kernel dies when pandas.read_clipboard() is called

See original GitHub issue

Description of your problem

Whenever I try to load a dataframe from the clipboard with pandas.read_clipboard() I see the message “It seems the kernel died unexpectedly. Use ‘Restart kernel’ to continue using this console.”

What steps will reproduce the problem?

  1. Copy some table to clipboard:
   c1  c2  c3  c4
0   1   2   2   1
1   1   3   2   3
2   3   4   4   3
3   4   5   6   5
4   5   6   9   7
  1. Import pandas and call read_clipboard
import pandas as pd
df = pd.read_clipboard()

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

It is expected to have the table loaded in the dataframe df. Instead, it displays the message:

It seems the kernel died unexpectedly. Use ‘Restart kernel’ to continue using this console.

Please provide any additional information below

I have two environments: one with Python 2.7.11 (named p2) and one with Python 3.5.1 (named p3). Root environment also has Python 3.5.1. The problem does not occur in p2. With Python 3.5.1 it occurs with both pandas v0.18.0 and v0.18.1.

If I run Python (3.5.1 with root env or with p3 env.) from the command line, it loads the dataframe with no errors.

Environment p3 in Spyder:

pdclipboard2

Root environment:

pdclipboard1

Environment p3 in command line:

pdreadclipboard4

Environment p3 with IPython from the command line:

pdclipboard5

Versions and main components

  • Spyder Version: 2.3.8
  • Python Version: 3.5.1
  • Operating system: Windows 10 Pro 64-bit

Dependencies

IPython >=1.0 : 4.1.2 (OK) jedi >=0.8.1;<0.9.0: 0.9.0 (NOK) matplotlib >=1.0 : 1.5.1 (OK) pandas >=0.13.1 : 0.18.1 (OK) pep8 >=0.6 : 1.7.0 (OK) pyflakes >=0.6.0 : 1.1.0 (OK) pygments >=1.6 : 2.1.1 (OK) pylint >=0.25 : None (NOK) qtconsole >=4.0 : 4.2.0 (OK) rope >=0.9.2 : 0.9.4-1 (OK) sphinx >=0.6.6 : 1.3.1 (OK) sympy >=0.7.3 : 1.0 (OK) zmq >=2.1.11 : 15.2.0 (OK)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ccordoba12commented, Aug 13, 2017

Closing because there’s nothing we can do in Spyder about this.

0reactions
aravindsdcommented, Nov 13, 2016

See Pandas documentation to use read_clipboard (Anaconda Package) It seems pandas read_clipboard need optional dependencies which are not yet compatible with python 3.5. I guess that’s hindrance for read_clipboard

http://pandas.pydata.org/pandas-docs/stable/install.html#optional-dependencies

image

Doesn’t have any issue in Python 3.4 (Anaconda Package)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kernel dies when processing DataFrame - Stack Overflow
I've been able to get this to execute once but since then the kernel just hangs and then dies.
Read more >
Newbie question, I keep getting a dead kernel warning when ...
Hi, I'm trying to learn python, and can't get notebook to run pandas, ... When a kernel dies without any warning, this often...
Read more >
Jupyter kernel dying every time I touch a small pandas ...
Using Python 3.6. I have a simple dataframe: DateTimeIndex, 104 rows, about 30 columns of Floats. Total size 30kb according to df.info() ....
Read more >
Splitting a csv files with inconsistent column numbers-Pandas ...
In order to have clean sets of data, it's best to split them into separate files. If the number of columns only ever...
Read more >
929d7baa32c9e105f84c5f2c29e...
%matplotlib inline from io import StringIO import pandas as pd import ... write error in dd if ssh dies out, err = ssh_process.communicate()....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found