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.

TypeError in Outline explorer

See original GitHub issue

Description

What steps will reproduce the problem?

Doing anything with outline explorer doesn’t do as expected. Clicking on Display variables and attributes will cause an error. special comments and def and class information is not displayed for all files

ADDENDUM (the next day) I have tracked down the issues to scripts in a project. If I close my project and navigate to a folder outside any project path and load any script, the outline pane displays as it should. You can click on a def or class and the code in the editor is navigated to.
More importantly, you can see the complete tree of your script’s functions/methods and classes to facilitate navigation and organization. Closing Spyder and reopening necessitates closing all open scripts and reloading them in order to get the tree information back

Traceback

  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 433, in toggle_variables
    self.update_editor(editor.info, editor)
  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 615, in update_editor
    update = self.update_tree(items, editor_id, language)
  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 645, in update_tree
    for symbol in items:
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 433, in toggle_variables
    self.update_editor(editor.info, editor)
  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 615, in update_editor
    update = self.update_tree(items, editor_id, language)
  File "C:\arc_pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder\plugins\outlineexplorer\widgets.py", line 645, in update_tree
    for symbol in items:
TypeError: 'NoneType' object is not iterable

Versions

  • Spyder version: 4.2.0
  • Python version: 3.7.9
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  3.0.4 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=4.0                   :  7.18.1 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
nbconvert >=4.0                 :  5.6.1 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
paramiko >=2.4.0                :  2.7.2 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.7.2 (OK)
pygments >=2.0                  :  2.7.0 (OK)
pylint >=1.0                    :  2.6.0 (OK)
pyls >=0.36.1;<1.0.0            :  0.36.1 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.1.1             :  0.2.1 (OK)
qdarkstyle >=2.8                :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.1 (OK)
qtconsole >=4.7.7               :  4.7.7 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
rtree >=0.8.3                   :  0.9.4 (OK)
setuptools >=39.0.0             :  51.0.0.post20201207 (OK)
sphinx >=0.6.6                  :  3.2.1 (OK)
spyder_kernels >=1.10.0;<1.11.0 :  1.10.0 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3               :  0.10.4 (OK)
zmq >=17                        :  19.0.2 (OK)

# Optional:
cython >=0.21                   :  None (NOK)
matplotlib >=2.0.0              :  3.3.1 (OK)
numpy >=1.7                     :  1.19.2 (OK)
pandas >=1.1.1                  :  1.1.3 (OK)
scipy >=0.17.0                  :  1.5.2 (OK)
sympy >=0.7.3                   :  1.5.1 (OK)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cruyffturncommented, Feb 22, 2021

Thank you. It solved the issue.

0reactions
ghost711commented, Mar 1, 2021

This is another problem. We think it’s related to issue #14236 and we’ll try to fix it in a future version.

Great, thanks. For whatever it’s worth, Go To Definition seems to work fine for me though. No problems with that for ages!
I’ll take a look in that part of the code though if it might be related…

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Outline Explorer in Spyder? - python - Stack Overflow
I think the Outline Explorer is made to facilitate navigation inside a long and/or dense Python script. In one look you can see...
Read more >
RDi 7.5 - outline view external data structures not updating ...
I have noticed that once an externally-defined data structure has been created in the outline view of an iProject, it is not updated...
Read more >
HTML Standard
4.3.11.1 Sample outlines; 4.3.11.2 Exposing outlines to users. 4.3.12 Usage summary. 4.3.12.1 Article or section? 4.4 Grouping content. 4.4.1 The p element ...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Changed border-width, column-width, outline-width, perspective, flex-grow, ... Threw TypeError when getFunctionRealm hits revoked Proxy (r273661) ...
Read more >
spyder3-3.2.8-bp153.1.16 - SUSE Package Hub -
... TypeError while executing code instructions in the IPython console * Prevent Editor dockwidget to become visible when clicking on the outline explorer ......
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