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

Variable explorer auto-refreshes after kernel restarts #2517

Closed
geancarlo2 opened this issue Jul 4, 2015 · 5 comments
Closed

Variable explorer auto-refreshes after kernel restarts #2517

geancarlo2 opened this issue Jul 4, 2015 · 5 comments

Comments

@geancarlo2
Copy link

Hi,
this issue is similar to #1958 .

I have disabled Spyder's autorefresh feature but the variable explorer still refreshes automatically. The IDE is unusable when I have series of loops and complicated nested data structures because the variable explorer freezes the execution of my code frequently, causing it to take much longer to complete than when executed on an ipython console.

I'm using Spyder 2.3.5.2 distributed via conda.

Please let me know if you need more information.

@ccordoba12
Copy link
Member

Refreshing should only occur at the end of a given computation. The auto-refresh option means that refreshing is done at a certain amount of time, but that's disabled for IPython consoles.

So, please post a reproducible example to see what's happening in this case :-)

@geancarlo2
Copy link
Author

Thanks for the quick reply.
First, I have disabled the autorefresh by unticking the checkbox. When I run the following simple script (F5/runfile(...)), I can see in the variable explorer the value of n being updated.

In particular:

  • If I have the refresh interval set to 4000ms, I see the value being incremented in steps of four (with approx. +-1 variations)
  • If I have the refresh interval set to 5000ms, I see the value being incremented in steps of five (with approx. +-1 variations)
    etc

I don't think this is intended behavior of the autorefresh feature and, furthermore, it can be problematic with complicated variables in real scenarios.

test script:

import time
for n in range(100):
    time.sleep(1)

@ccordoba12 ccordoba12 added this to the v3.0 milestone Jul 25, 2015
@ccordoba12
Copy link
Member

I'm not able to reproduce your bug when both the variable explorer and the IPython console are focused, and I wait until the computation is over.

Please be sure that the Auto-refresh button is not pressed in the Variable Explorer either, i.e. this button:

seleccion_001

There are two situations when the variable explorer gets refreshed (but no auto-refreshed):

  1. If you leave focus from the Variable Explorer to see other panes (e.g. the Object Inspector) and then come back to it again.
  2. If you focus a window different than Spyder (e.g. Firefox) and then come back to Spyder again, and the Variable Explorer is focused.

@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0 Jul 25, 2015
@geancarlo2
Copy link
Author

Hi @ccordoba12, I've looked at this issue again and it seems like the variable editor starts acting funny after restarting the ipython console kernel.
If it is not too much trouble, please watch this short screen recording https://www.youtube.com/watch?v=VKRvX8C3IgE

This video shows how:

  1. it behaves correctly right after starting spyder, but for some reason the auto-refresh button is disabled
  2. after restarting the console kernel the button is not pressed, but it auto-refreshes
  3. then if I press and unpress the button, auto-refresh is disabled as expected
  4. it does a single refresh of the variable explorer if I focus the console even if auto-refresh is disabled.(perhaps this is intended behavior, if I understood you correctly)

@ccordoba12 ccordoba12 modified the milestones: v2.3.6, v3.1 Aug 15, 2015
@ccordoba12 ccordoba12 changed the title Variable explorer still auto-refreshes even if disabled Variable explorer auto-refreshes after kernel restarts Aug 23, 2015
@ccordoba12
Copy link
Member

@geancarlo, thanks for the video and for narrowing down this problem. Now I can reproduce it on my side and I know how to fix it.

This will be part of 2.3.6, to be released next week.

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

2 participants