spyder: Outline doesn't show anything except the file.
What steps will reproduce the problem?
The surprising part is that the problem is not always present. Sometimes I do have the classes, function and section (#%%) properly displayed, and I can quickly navigate my files by clicking on the corresponding function in the outline. Sometimes, the outline only shows the name of the file, e.g. loader.py.
For the same file on a different laptop using macOS or windows and spyder 4.2.5 instead of 5.0.0, the outline is working.
I don’t see any error message which could help debug this. This post is mostly to raise awareness of this problem and check if anyone else is experiencing the same behavior.
Package Version Location
----------------------------- ---------- --------------------------------------
alabaster 0.7.12
appdirs 1.4.4
apptools 5.1.0
arrow 1.0.3
astroid 2.4.2
async-generator 1.10
atomicwrites 1.4.0
attrs 20.3.0
autopep8 1.5.4
autoreject 0.2.2
Babel 2.9.0
backcall 0.2.0
bcrypt 3.2.0
binaryornot 0.4.4
black 20.8b1
bleach 3.2.2
certifi 2020.12.5
cffi 1.14.4
chardet 4.0.0
click 7.1.2
cloudpickle 1.6.0
colorama 0.4.4
configobj 5.0.6
configparser 5.0.1
cookiecutter 1.7.2
cryptography 3.3.1
cycler 0.10.0
decorator 4.4.2
defusedxml 0.6.0
diff-match-patch 20200713
docutils 0.16
entrypoints 0.3
envisage 5.0.0
flake8 3.8.4
future 0.18.2
h5py 3.1.0
helpdev 0.7.1
idna 2.10
imageio 2.9.0
imagesize 1.2.0
importlib-metadata 3.4.0
importlib-resources 5.1.0
inflection 0.5.1
intervaltree 3.1.0
ipykernel 5.5.3
ipython 7.22.0
ipython-genutils 0.2.0
isort 5.7.0
jedi 0.17.2
Jinja2 2.11.2
jinja2-time 0.2.0
joblib 1.0.0
jsonschema 3.2.0
jupyter-client 6.1.12
jupyter-core 4.7.1
jupyterlab-pygments 0.1.2
keyring 21.8.0
kiwisolver 1.3.1
lazy-object-proxy 1.4.3
MarkupSafe 1.1.1
matplotlib 3.3.3
mayavi 4.7.2
mccabe 0.6.1
meshio 4.3.8
mistune 0.8.4
mne 0.22.0
mypy-extensions 0.4.3
nbclient 0.5.1
nbconvert 6.0.7
nbformat 5.1.2
nest-asyncio 1.4.3
NeuroDecode 0.9.dev0 c:\users\mathieu\documents\neurodecode
numpy 1.19.5+mkl
numpydoc 1.1.0
opencv-python 4.4.0
packaging 20.8
pandas 1.2.1
pandocfilters 1.4.3
paramiko 2.7.2
parso 0.7.0
pathspec 0.8.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.1.0
pip 21.0.1
pluggy 0.13.1
poyo 0.5.0
prompt-toolkit 3.0.18
psutil 5.8.0
ptyprocess 0.7.0
PyAudio 0.2.11
pycodestyle 2.6.0
pycparser 2.20
pydocstyle 5.1.1
pyface 7.2.0
pyflakes 2.2.0
Pygments 2.8.1
pylint 2.6.0
pyls-black 0.4.6
pyls-spyder 0.3.2
pylsl 1.14.0
PyNaCl 1.4.0
pyparsing 2.4.7
PyQt5 5.12.3
PyQt5-sip 12.8.1
pyqtgraph 0.11.1
PyQtWebEngine 5.12.1
pyrsistent 0.17.3
pyserial 3.5
python-dateutil 2.8.1
python-jsonrpc-server 0.4.0
python-language-server 0.36.2
python-slugify 4.0.1
pytz 2020.5
pyvista 0.27.4
pywin32 300
pywin32-ctypes 0.2.0
pyxdf 1.16.3
pyzmq 22.0.3
QDarkStyle 3.0.2
qstylizer 0.1.10
QtAwesome 1.0.2
qtconsole 5.0.3
QtPy 1.9.0
regex 2020.11.13
requests 2.25.1
rope 0.18.0
scikit-learn 0.24.1
scipy 1.6.0
scooby 0.5.6
setuptools 54.2.0
simplejson 3.17.2
six 1.15.0
snowballstemmer 2.1.0
sortedcontainers 2.3.0
sounddevice 0.4.1
Sphinx 3.4.3
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 1.0.3
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.4
spyder 5.0.0
spyder-kernels 2.0.1
testpath 0.4.4
text-unidecode 1.3
textdistance 4.2.0
threadpoolctl 2.1.0
three-merge 0.1.1
tinycss 0.4
toml 0.10.2
tornado 6.1
traitlets 5.0.5
traits 6.1.1
traitsui 7.1.1
typed-ast 1.4.2
typing-extensions 3.7.4.3
ujson 4.0.2
urllib3 1.26.2
VTK 9.0.1
watchdog 1.0.2
wcwidth 0.2.5
webencodings 0.5.1
wheel 0.36.2
wrapt 1.12.1
xgboost 1.3.3
xlrd 2.0.1
XlsxWriter 1.3.7
yapf 0.30.0
zipp 3.4.0
Screenshot of the issue:

While on a second computer on macOS Big Sur with spyder 4.2.5:
The file loader.py is 600+ lines, so I am not going to copy-paste it. The structure should be clear from the second screenshot: a few classes which inherit from Exception, a few sections with functions defined in each.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 66 (30 by maintainers)
5.0.2 finally resolved this for me and I am so grateful! Looked up your open collective, you’ve got a new monthly backer, just to say thanks.
@ccordoba12
I am using spyder 5.1.5 and have the same behavior as mensioned by @dsmccormick8492 If open the project, the methods and classes will not display. However, code cell markers will display. If open the file only without project, the functions and classes do display.
I turned back on the Kite provider, looks like it is solved, great!
@yaaun, please provide a simple example of a directory or project structure that fails to show symbols for some of its files.
Also, upload that example to issue #16406, because we’re tracking this problem there.
Yes. I am on windows. because some parts of my project can only work on windows. So have to use it. I’ll try your new version later. Thanks again! @ccordoba12
@ccordoba12 Thank you! Update 5.1.1 seems to have fixed the issue.
@issimo007, I’m looking at that problem right now. We’ll try to fix it in our 5.1.1 version, to be released shortly.
Thanks for the hints @ghost711! I managed to reproduce the problem with them and I think I have for it that we’ll include in our 5.1.0 version, to be released at the end of the month.
thanks a lot for fixing this!!
@dalthviz Unchecking
Enable Kite Providerdoes solve both issues: Outline is restored and Ctrl+Click on a function does work.@steff456 I added the screenshot taken from both my computers on the same file (same git repo). Note that the issue is not raised by this file only, I just chose it as it shows the problem clearly as it contains both sections, functions, and classes.