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

Stop button in the IPython console is not working with Python 3.7 on Windows #8013

Closed
10 tasks
Ares8947 opened this issue Oct 5, 2018 · 57 comments · Fixed by #8337
Closed
10 tasks

Stop button in the IPython console is not working with Python 3.7 on Windows #8013

Ares8947 opened this issue Oct 5, 2018 · 57 comments · Fixed by #8337

Comments

@Ares8947
Copy link

Ares8947 commented Oct 5, 2018

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I use the anaconda 5.3,and I update all in the conda(conda update --all)
And I found the bug in the spyder,Whether or not I upgrade
My English is Terrible,so....
I don't know if I have clearly expressed my question.

like this code:
for i in range(0,10000):
print(i)

I click the button of stop the current command(the red one),but it doesn't work

What steps reproduce the problem?

  1. run .py
  2. Run script will run all the time
  3. Spyder can't stop until finish

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

Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

  • Spyder version: 3.3.1
  • Python version: 3.7.0
  • Qt version: QtConsole 4.4.1
  • PyQt version: IPython 7.0.1
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE
@Ares8947
Copy link
Author

Ares8947 commented Oct 5, 2018

Win10 64bits

@ccordoba12
Copy link
Member

Please downgrade to IPython 6 and ipykernel 4.10 to see what happens.

@Ares8947
Copy link
Author

Ares8947 commented Oct 5, 2018

I downgrade ipykernel from 5.0.0 to 4.10.0,but Ipython can't downgrade
Not working....

@Ares8947
Copy link
Author

Ares8947 commented Oct 5, 2018

but the anaconda 5.2 can work,
update --all,,,
python 3.6.6,
spyder 3.3.1
It can work

but I have obsessive,
I like Latest version......

So....
Sorry...

@ccordoba12
Copy link
Member

but I have obsessive,
I like Latest version

This is a bad idea. You should update only when necessary or perhaps twice per year. Else, you'll find errors like the one you just reported.

@ccordoba12 ccordoba12 changed the title Click stop the current command,but it doesn't work Stop button in the IPython console is not working with ipykernel 5.0+ Oct 5, 2018
@ccordoba12 ccordoba12 added this to the v3.3.2 milestone Oct 5, 2018
@ccordoba12
Copy link
Member

@CAM-Gerlach, are you able to reproduce this?

@CAM-Gerlach
Copy link
Member

@ccordoba12 Updating to Anaconda 5.3 now to check...

@ccordoba12
Copy link
Member

Thanks!

@CAM-Gerlach
Copy link
Member

@ccordoba12 I wasn't able to update base to anaconda 5.3.0 at the moment since I have several Spyder instances currently open, but I could not reproduce this running the code and hitting the stop button on Windows 8.1 x64 in Spyder 3.3.1 after updating to IPython 7.0.1 and IPyKernel 5.0.0 in a separate Spyder env on Python 3.7.0. a KeyboardInterrupt was raised and execution stopped as expected.

@ccordoba12
Copy link
Member

That was my experience on Linux too.

@ccordoba12 ccordoba12 removed this from the v3.3.2 milestone Oct 5, 2018
@Ares8947
Copy link
Author

Ares8947 commented Oct 6, 2018

@ccordoba12 @CAM-Gerlach
Thanks!

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@ccordoba12 @CAM-Gerlach Is this bug just happening to me?

@CAM-Gerlach
Copy link
Member

@Ares8947 Perhaps, but more likely its just another package than the two obvious suspects we tested, ipython and pykernel. It could be something related, like tornado, pyzmq/zeromq, jupyter_client, traitlets, or even a dependency thereof. It could be anything that conda update --all updated, which amounts to dozens and dozens of packages at least, and given the number of combinations of packages and versions is at the very least in the thousands, it may be very difficult to find simply be trial and error without recreating your exact environment. That's why the anaconda metapackage exists and why conda update anaconda or conda install anaconda=X.Y.Z is recommended update method, and/or just updating individual packages like Spyder that don't have many reverse dependencies and that you specifically need.

What I recommend you do is run conda install anaconda=5.3 and see if the issue persists. If it does, then we can properly confirm if we can reproduce it on our end or not. Thanks.

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@CAM-Gerlach I follow your advice,conda install anaconda=5.3,and reset spyder setting.But the problems still exist.

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@ccordoba12 @CAM-Gerlach

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Oct 9, 2018

[img]http://thyrsi.com/t6/384/1539064833x1822611383.gif[/img]

This is Github, not a forum, so BBcode won't work here. However, Markdown will, and you can simply copy and paste the image here directly.

EDIT: I see you did, great.

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@CAM-Gerlach Thank you for your time and patience. :)

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

Anaconda 5.2 python 3.6.6 spyder 3.3.1,The same problem will not arise.
So....I am very sorry to waste your time.
Thanks!

@CAM-Gerlach
Copy link
Member

@Ares8947 Ares8947 Okay, thanks. I'll boot up my Windows 10 test machine, update an untouched base env to Anaconda 5.3 and see if I can reproduce. For the record, you didn't install any other packages other than those already installed in your base environment, correct? Can you also try creating a new environment (conda create -n spyder-test-env python=3.7), activate it, conda install spyder, and see if it occurs there if you run spyder?

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Oct 9, 2018

Anaconda 5.2 python 3.6.6 spyder 3.3.1,The same problem will not arise. So....I am very sorry to waste your time. Thanks!

You're not wasting our time; you're helping us isolate this issue this it could happen to others. You've already mentioned that this is the case, so I'm not sure how that would invalidate your issue. It may be an hour or so before my machine downloads and installs everything, since I don't regularly update it.

Once you've tried the above, could you try switching python to 3.7 in your current Anaconda 5.2 setup, see if it reoccurs, then upgrade to Anaconda 3 and try Python 3.6 there? Just trying to isolate another variable. If that doesn't change anything, its likely a specific package that's the issue.

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

I am trying.....

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

I think it should be the cause of python3.7 @CAM-Gerlach @ccordoba12

@CAM-Gerlach
Copy link
Member

I found the v4.0beta2

The current beta is beta 1, so I'm not sure how you found beta 2 since its doens't exist yet :)

I think it should be the cause of python3.7

?

@Ares8947
Copy link
Author

Ares8947 commented Oct 9, 2018

@CAM-Gerlach
I use Google translate...
:(
I have to sleep,Our time is 1:35 am,,,,,ZZZZzzzzzzz
Good night....
Good morning for you?
Good afternoon for you?

..........ZZZZZzzzzz
I look forward to solving this bug....
Thanks!

@Ares8947
Copy link
Author

@ccordoba12 @CAM-Gerlach
Now I have upgraded to the latest version
anaconda 5.3.1
spyder 3.3.2
The problem remains unresolved
:(

@ccordoba12
Copy link
Member

This is not something we can solve in our side, sorry.

@Ares8947
Copy link
Author

Oh,god....
I'm used to using spyder.
I like the variable explorer..
I'm sorry to hear that.
@ccordoba12

@Ares8947
Copy link
Author

This Bug is a common phenomenon, not just for me.
@ccordoba12

@CAM-Gerlach
Copy link
Member

@ccordoba12 Okay, then should I report it to ipykernel? I was able to repro it in QtConsole (4.4.1 and 4.4.2 tested): Pressing Ctrl-C or Kernel > Interrupt during time.sleep(10) (eventually) produces a KeyboardInterrupt traceback and stops the command in Python 3.6, while not doing so in Python 3.7. I tested under several different versions of QtConsole, IPykernel, and IPython for both and identical versions of Jupyter_Client and Jupyter_core.

@ccordoba12
Copy link
Member

@CAM-Gerlach, yes, if you were able to reproduce this problem in QtConsole, then it's an ipykernel bug. Please ping me and minrk, and reference this issue when reporting.

Does it help to downgrade that package to 4.10?

@CAM-Gerlach
Copy link
Member

Thanks, I'll report it.

Does it help to downgrade that package to 4.10?

Nope, makes no difference, and neither does 4.8.2 which I tested both previously way back when this was first reported and now. Nor does downgrading IPython to 6.x as well, according to my previous testing.

@CAM-Gerlach CAM-Gerlach changed the title Stop button in the IPython console is not working with ipykernel 5.0+ Stop button in the IPython console is not working with Python 3.7 on Windows Nov 30, 2018
@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Nov 30, 2018

@ccordoba12 Reported there as ipython/ipykernel#374 . Also, I wasn't able to reproduce it on my Fedora 28 Linux VM under various versions on Python 3.7 (and the interrupt was processed vastly quicker than on Windows either way), so it appears to be a Windows-specific bug.

@Ares8947
Copy link
Author

Thank you for your help to Windows users.
Thanks!!!!
@ccordoba12 @CAM-Gerlach

@minrk
Copy link
Contributor

minrk commented Nov 30, 2018

Should be fixed by #8337

@ccordoba12 ccordoba12 added this to the v4.0beta2 milestone Dec 1, 2018
@minrk
Copy link
Contributor

minrk commented Dec 10, 2018

jupyter-client 5.2.4 is released with the fix, too

@CAM-Gerlach
Copy link
Member

Thanks @minrk !

Thank you for your help to Windows users. Thanks!!!!

@minrk is the one to thank, since he did all the work.

@ccordoba12
Copy link
Member

Thanks a lot for your help Min!

@Ares8947
Copy link
Author

@minrk @ccordoba12 @CAM-Gerlach Thanks a lot!

@great-wide-open
Copy link

great-wide-open commented Dec 20, 2018

Should be fixed by #8337

In the above fix, it instructs to set close_fds=False. Where/how do you make this change?

@great-wide-open
Copy link

great-wide-open commented Dec 20, 2018

Should be fixed by #8337
In the above fix, it instructs to set close_fds=False. Where/how do you make this change?

Nevermind. Found that you perform the following in your Spyder environment
conda install jupyter_client=5.2.4

@CAM-Gerlach
Copy link
Member

That's correct; glad you figured it out. Happy Spydering!

@SaumyaShikhar
Copy link

Should be fixed by #8337
In the above fix, it instructs to set close_fds=False. Where/how do you make this change?

Nevermind. Found that you perform the following in your Spyder environment
conda install jupyter_client=5.2.4

How did you do it?

@great-wide-open
Copy link

great-wide-open commented Dec 31, 2018

Should be fixed by #8337
In the above fix, it instructs to set close_fds=False. Where/how do you make this change?

Nevermind. Found that you perform the following in your Spyder environment
conda install jupyter_client=5.2.4

How did you do it?

Open up an Anaconda command prompt and then type:
conda install jupyter_client=5.2.4

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

Successfully merging a pull request may close this issue.

6 participants