Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming file containing folders yields IndexError. #5157

Closed
msgnaf opened this issue Sep 7, 2017 · 1 comment
Closed

Renaming file containing folders yields IndexError. #5157

msgnaf opened this issue Sep 7, 2017 · 1 comment

Comments

@msgnaf
Copy link

msgnaf commented Sep 7, 2017

Description

What steps will reproduce the problem?

  1. Opening some files in Spyder under Windows 7.
  2. Trying to rename the folder in which the files are located.
  3. Windows will possibly remark that the files are currently open (and it is possible to try again to rename the folder).
  4. Restart the python kernel (optionally, only if renaming the folder was not possible).
  5. Retry to rename the file containing folder (windows will now rename the folder).
  6. Spyder will remark that the files have been removed or deleted outside of the editor and will allow to close the files.
  7. Close all files that were opened in Spyder (and were located in the renamed folder).

What is the expected output? What do you see instead?

Spyder should close the file without promting an IndexError.

Please provide any additional information below

File "C:\Users\TheUser\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\widgets\editor.py", line 1660, in current_changed
self.current_file_changed.emit(self.data[index].filename,
IndexError: list index out of range

Version and main components

  • Spyder Version: 3.2.0
  • Python Version: 3.6.1
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.6.0 :  1.5.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.20.1 (OK)
numpy >=1.7      :  1.12.1 (OK)
sphinx >=0.6.6   :  1.5.6 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  5.1.1 (OK)
sympy >=0.7.3    :  1.0 (OK)
cython >=0.21    :  0.25.2 (OK)
qtconsole >=4.2.0:  4.3.0 (OK)
IPython >=4.0    :  5.3.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

@ccordoba12
Copy link
Member

Thanks for the detailed description of the problem. We'll fix this problem in 3.2.3

@dalthviz, please take a look at this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants