Closed Hawxxer closed 2 years ago
Maybe adding to this, if the class do not have any methods (is it called methods in python? I mean functions in classes) only variables I can open the object in Object Explorer. Example Code:
class test:
x = 2
myclass = test()
--EDIT--
Is viewing other objects than the supported objects like numpy, pandas and so generally not supported? If I try
import numpy as np
class test:
x = np.array([1,2])
myclass = test()
I can't look at the object either with installer or installed via conda like stated above
Also there is no error message in the normal / internal console
--Edit2-- Maybe related to this Issue
Hi @Hawxxer thank you for your feedback! I was unable to reproduce this on Windows 10. In my case this is what I'm seeing:
Also, did you update from a previous installer version without uninstalling the previous one first? Could be possible for you to uninstall the current version of the standalone Spyder you have and install Spyder again?
Any new info in order to reproduce this is greatly appreciated. Let us know!
Yes, this could have been the problem, after reinstalling spyder (installer) and miniconda it's working fine.
@dalthviz @Hawxxer I'm experiencing the same bug with Spyder 5.2.2 (and also older versions like 5.1.5 and 5.05) on Win10. It used to work before as shown in https://github.com/spyder-ide/spyder/issues/17065#issuecomment-999647905 I already tried uninstalling previous versions and reinstalling Spyder 5.2.2, did not help. I'd like to avoid reinstalling miniconda and all my environments, therefore any idea what's the root of this issue would be greatly appreciated.
Hi @roteiro, is this happening only with a specific custom interpreter env in your setup or with all the envs? Could you try to create a new env to test if the custom interpreter continues raising the error message when using the object explorer? Also, do you have some example code that triggers this for you or the original one posted here also triggers the error message dialog in your case?
Let us know!
Hi @dalthviz, thanks for the quick reply. Here is my setup, example code and results from my tests.
Spyder Version: 5.2.2 (current Windows installer)
@roteiro checking a little bit I'm getting a ModuleNotFoundError: No module named 'acoustics'
. I think this is related with the unpickling done to get the variable value which fails since when trying to retrive the variable the Spyder installation needs the module associated with the variable (in this case acoustics
). I'm not totally sure if we can do something about this or if there is already an issue regarding that, maybe we should improve the message being displayed in the dialog. Pinging @ccordoba12 just in case.
Just want to add, that the issue occurred again for me i just gave up and lived with it. Maybe reinstall helps again. It occurres with the installer version under both windows 11 and MacOs Monterey with Spyder Version 5.2.2.
I used the installer version, after a while I couldn't view panda Dataframes anymore, today I installed spyder via conda install -c conda-forge spyder
(so I have the standalone installer and one version in a miniconda env parallel). Selecting the same custom python interpreter, the standalone can't show pandas, the conda env one can.
I add a comparison, left is standalone, right via miniconda. Will try to reinstall the standalone when I find time.
Hi @Hawxxer I think the issue with pandas
is related with the Python version that is being bundled with the installer (Python 3.7) which is incompatible with the pandas version in your custom interpreter env (pandas 1.4.0). So, I think most probably your issue is related with https://github.com/spyder-ide/spyder/issues/17253
Let us know if the info there helps!
I have a similar configuration: base environment with Spyder 5.1.5
and other environments with spypder-kernels 2.1.3
. All environments with python 3.9.7
. Spyder (using the Python interpreter from the working environment) could not retrieve the value of a pandas dataframe.
My working environment had pandas 1.4.1
. When I downgraded it to version 1.3.5, the Spyder variable explorer worked again.
Issue Report Checklist
spyder --reset
Problem Description
When trying to open an object I defined myself with, I get this error
While it says, don't report this to github, I think it is a problem with Spyder itself because I don't encounter this problem when using a Spyder version that is installed in a conda env.
Maybe the current spyder-kernels from conda-forge is not compatible with the current spyder installer? When I use the default python interpreter the problem below does not occur, the object is viewable in the Object Explorer
What steps reproduce the problem?
myclass = test(2)
Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK) chardet >=2.0.0 : 4.0.0 (OK) cloudpickle >=0.5.0 : 2.0.0 (OK) cookiecutter >=1.6.0 : 1.7.3 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree : None (OK) IPython >=7.6.0 : 7.30.1 (OK) jedi >=0.17.2;<0.19.0 : 0.18.1 (OK) jellyfish >=0.7 : 0.8.9 (OK) jsonschema >=3.2.0 : 4.2.1 (OK) keyring >=17.0.0 : 23.4.0 (OK) nbconvert >=4.0 : 6.3.0 (OK) numpydoc >=0.6.0 : 1.1.0 (OK) paramiko >=2.4.0 : 2.8.1 (OK) parso >=0.7.0;<0.9.0 : 0.8.3 (OK) pexpect >=4.4.0 : 4.8.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) psutil >=5.3 : 5.8.0 (OK) pygments >=2.0 : 2.10.0 (OK) pylint >=2.5.0 : 2.12.2 (OK) pyls_spyder >=0.4.0 : 0.4.0 (OK) pylsp >=1.3.2;<1.4.0 : 1.3.3 (OK) pylsp_black >=1.0.0 : 1.0.1 (OK) qdarkstyle =3.0.2 : 3.0.2 (OK) qstylizer >=0.1.10 : 0.2.1 (OK) qtawesome >=1.0.2 : 1.1.1 (OK) qtconsole >=5.2.1;<5.3.0 : 5.2.2 (OK) qtpy >=1.5.0 : 1.11.3 (OK) rtree >=0.9.7 : 0.9.7 (OK) setuptools >=49.6.0 : 59.6.0 (OK) sphinx >=0.6.6 : 4.3.1 (OK) spyder_kernels >=2.2.0;<2.3.0 : 2.2.0 (OK) textdistance >=4.2.0 : 4.2.2 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog : 2.1.6 (OK) zmq >=17 : 22.3.0 (OK)
Optional:
cython >=0.21 : 0.29.25 (OK) matplotlib >=2.0.0 : 3.5.1 (OK) numpy >=1.7 : 1.19.3 (OK) pandas >=1.1.1 : 1.3.5 (OK) scipy >=0.17.0 : 1.7.3 (OK) sympy >=0.7.3 : 1.9 (OK)