Spyder: Opening a new editor window results in an error

Created on 29 Apr 2019  路  5Comments  路  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

Repros every time in --safe-mode as well as normal. @ok97465 reported this on Gitter as well.

Perhaps we should include a simple regression test for this...

Traceback

  File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\editor\plugin.py", line 1289, in create_new_window
    sort_files_alphabetically=oe_options['sort_files_alphabetically'])
  File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\editor\widgets\editor.py", line 2886, in __init__
    sort_files_alphabetically)
  File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\editor\widgets\editor.py", line 2822, in __init__
    unregister_editorstack_cb=self.unregister_editorstack)
  File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\editor\widgets\editor.py", line 2596, in __init__
    self.register_editorstack_cb(self.editorstack)
  File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\editor\widgets\editor.py", line 2849, in register_editorstack
    self.readwrite_status.readonly_changed)
AttributeError: 'ReadWriteStatus' object has no attribute 'readonly_changed'

Versions

  • Spyder version: 4.0.0.dev0 719f56082
  • Python version: 3.7.2
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 8.1

Dependencies

pygments >=2.0    :  2.3.1 (OK)
qdarkstyle >=2.6.4:  2.6.5 (OK)
sphinx >=0.6.6    :  1.8.4 (OK)
pyls >=0.19.0     :  0.21.5 (OK)
nbconvert >=4.0   :  5.4.0 (OK)
pandas >=0.13.1   :  0.24.2 (OK)
numpy >=1.7       :  1.15.4 (OK)
sympy >=0.7.3     :  1.3 (OK)
cython >=0.21     :  0.29.4 (OK)
qtconsole >=4.2.0 :  4.4.3 (OK)
IPython >=4.0     :  7.2.0 (OK)
matplotlib >=2.0.0:  3.0.2 (OK)
pylint >=0.25     :  2.2.2 (OK)
Editor Bug

All 5 comments

@dalthviz, please take a look at this one.

I think I know what the problem is.

@goanpeca the problem is related with the calling readonly_changed instead of update_readonly or something like that?

Yep that was it. A leftover from a PR I did some weeks ago :-|

A leftover from a PR I did some weeks ago :-|

And Kent Beck said, "Let there be unit tests." And it was good.

...Except that #9282 didn't add a regression test, so this could just as easily happen again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cchu08 picture cchu08  路  3Comments

spyder-bot picture spyder-bot  路  3Comments

danieltomasz picture danieltomasz  路  3Comments

spyder-bot picture spyder-bot  路  3Comments

LDONT picture LDONT  路  3Comments