Code tree in Spyder 5?

240 views
Skip to first unread message

Derek

unread,
May 12, 2021, 2:51:45 AM5/12/21
to spyd...@googlegroups.com
I recently upgraded to Syder 5 and am now unable to see / access the expandable code "tree" (outline) that was working in the previous version.

This is all I can see (image below, showing what I see for a typical Django models file) - what is needed to create/activate the code tree?

spy.png

Thanks
Derek



yfprojects

unread,
May 13, 2021, 1:51:03 PM5/13/21
to spyder
Hello Derek,

the `Expand all` button does only expand if there are sub items of an tree item. That isn't the case in your screenshot.
If the file does contain any classes, functions, code cells or code blocks, this is a bug. It could relate to this Issue on github.
I would be interested in whether code cells (created by `#%%`) or code blocks (created by `# -----`) are shown in the outline in case you add them.

Kind regards
yfprojects

Derek

unread,
May 14, 2021, 2:32:58 AM5/14/21
to spyd...@googlegroups.com
Hi

I did not show the main editing window with the actual code. But yes, it's a normal Python file (in this case containing Django models - classes - for an app). I use the # --- notation a lot to help ID sections of code but that does not appear for any Python files I work on.

I looked at issue 14871 but that seems very specific to __init__.py files whereas I experience this for every file.

Any ideas on what else to try?

Thanks
Derek



--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/5cfc378e-1fba-4c60-8488-232051edb1ebn%40googlegroups.com.

yfprojects

unread,
May 14, 2021, 2:44:57 AM5/14/21
to spyder
I did not show the main editing window with the actual code. But yes, it's a normal Python file (in this case containing Django models - classes - for an app). I use the # --- notation a lot to help ID sections of code but that does not appear for any Python files I work on.
 
Do you have the `Show special comments` checkbox ticked?
Popup-In-Outline.png

 
I looked at issue 14871 but that seems very specific to __init__.py files whereas I experience this for every file.
 
I actually had the problem in some other files too but initially it only occured in some `__init__.py` files. If you think you have a different issue it would be great if you filed a new issue at spyder repository on github.
 
Kind regards
yfprojects


Derek

unread,
May 16, 2021, 9:43:04 AM5/16/21
to spyd...@googlegroups.com
Hi

WRT "Do you have the `Show special comments` checkbox ticked?" - I cannot find that set of options anywhere in my Spyder setup - what is the menu path to access that screen?

Thanks.

yfprojects

unread,
May 17, 2021, 1:51:48 AM5/17/21
to spyder
I am sorry. The checkbox is in the popup that pops up when the right mouse button is clicked on the outline widget.

Kind regards
yfprojects

Derek

unread,
May 17, 2021, 2:09:27 AM5/17/21
to spyd...@googlegroups.com
OK, I see it in the "hamburger" menu for that panel.  Yes, it was checked.

i did report the problem and apparently it is fixed in the 5.0.2 release - https://github.com/spyder-ide/spyder/issues/15640

Reply all
Reply to author
Forward
0 new messages