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.

Variables disappear from Spyder 4.0 Variable Explorer

See original GitHub issue

Problem Description

Variables intermittently disappear from Variable Explorer When running various code, a variable that was visible in the Variable Explorer disappears Sometimes, scrolling away from the area of list where the variable should be, then clicking the column heading once or twice, and scrolling back makes the variable appear

In this image the variable experiments, a Pandas dataframe, is missing: image Here, after scrolling and sorting as noted, experiments now appears: image

What steps reproduce the problem?

  1. In some cases, running a code line that replaces the variable with a new value causes it to disappear, if it is not being displayed at present (i.e. if scrolled away). e.g. plot_name = study_name + ts.timestamp() + '.png' might cause plot_name to disappear
  2. In other cases, if the code is run as a script, then Variable Explorer is checked, the variable may be missing

Note: Variable Explorer Options were tested. Following is the current configuration, which did not resolve the issue: image

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

Expected outcome is that the variable appears in Variable Explorer as soon as it is created, and remains there until it is removed from the environment.

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

Spyder 4.0.0b5 Python 3.6.9 64-bit Qt 5.13.1 PyQt5 5.13.1 Windows 10

Dependencies

cloudpickle >=0.5.0 : 1.2.2 (OK) pygments >=2.0 : 2.4.2 (OK) qtconsole >=4.5.5 : 4.5.5 (OK) nbconvert >=4.0 : 5.6.0 (OK) sphinx >=0.6.6 : 2.2.0 (OK) pylint >=0.25 : 2.3.1 (OK) psutil >=0.3 : 5.6.3 (OK) qtawesome >=0.5.7 : 0.6.0 (OK) qtpy >=1.5.0 : 1.9.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) zmq >=17 : 18.1.0 (OK) chardet >=2.0.0 : 3.0.4 (OK) numpydoc >=0.6.0 : 0.9.1 (OK) spyder_kernels >=1.5.0;<2.0.0: 1.5.0 (OK) qdarkstyle >=2.7 : 2.7 (OK) atomicwrites >=1.2.0 : 1.3.0 (OK) diff_match_patch >=20181111 : 20181111 (OK) watchdog : None (OK) keyring : None (OK) pexpect >=4.4.0 : 4.7.0 (OK) pympler : None (OK) sympy >=0.7.3 : None (NOK) cython >=0.21 : None (NOK) IPython >=4.0 : 7.8.0 (OK) matplotlib >=2.0.0 : 3.1.2 (OK) pandas >=0.13.1 : 0.25.2 (OK) numpy >=1.7 : 1.16.5 (OK) scipy >=0.17.0 : 1.3.1 (OK) pyls >=0.28.2;<0.29.0 : 0.28.3 (OK) rtree >=0.8.3 : 0.8.3 (OK)

PASTE DEPENDENCIES HERE

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
eafprescommented, Sep 24, 2020

What is your DataFrame title? Is it uppercase to start?

I was having an issue where not all my data was showing in variables explorer. It appeared to be just DataFrames not showing.

Clicking on the upper right corner there is a drop down menu. I un-clicked “Exclude Capitalized Reference” and my dataframes starting with capital letters started to show.

This seems too simple to be the solution to your problem but thought I’d throw in my half a cent.

Maybe click or unclick the option and refresh

This actually was fully fixed in recent releases. It was an actual bug and the excellent team solved it.

1reaction
eafprescommented, Mar 9, 2020

Yes, it’s planned for a future release. The thing is I have some concerns about @impact27’s proposed solution, but I haven’t had time to test them, sorry.

Understand. My workaround is scrolling down and back and that almost always works. If I ever find anything that might shed more light on this I’ll definitely share.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data in Variable Explorer is not available for debugging in ...
Let's say I have 2 Python files: file1.py and file2.py . The latter needs a set of data generated by file1.py . However,...
Read more >
Variable Explorer not showing anything? - Google Groups
I am new to Python. Launched Spyder and typed a few lines of code from the book I am using. Sadly, my IDE...
Read more >
spyder-ide/public - Gitter
I accidentally removed user defined variables from the Spyder Variable explorer window. Now when I run python files the variables no longer show...
Read more >
Python Basic Data Analysis Tutorial - Andrew Mann
Examine these variables dimensions under the "Size" column in the Variable explorer, or type "newarray.shape" and "x1.shape" to output their dimensions. Now ...
Read more >
Blog | Variable Explorer improvements in Spyder 4
These include the brand new Object Explorer for inspecting arbitrary Python variables, full support for MultiIndex dataframes with multiple ...
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