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

Closing last open file while being in non-existing working dir raises exception #5099

Closed
kohr-h opened this issue Aug 31, 2017 · 2 comments
Closed

Comments

@kohr-h
Copy link

kohr-h commented Aug 31, 2017

Description

When closing the last file in the editor while the working directory is non-existing (e.g. after changing git branch) I get this exception:

File "[...]/spyder/plugins/editor.py", line 1746, in new
    basedir = getcwd()
FileNotFoundError: [Errno 2] No such file or directory

The same happens when I immediately try to open a file without changing the working dir.

Steps to reproduce the problem

  1. Make new directory and make it the working directory. Have a file open.
  2. Remove the directory on disk.
  3. Close all files in the editor.

Version and main components

  • Spyder Version: 3.2.1
  • Python Version: 3.6.2
  • Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  None (NOK)
numpy >=1.7      :  1.12.1 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
psutil >=0.3     :  5.2.2 (OK)
nbconvert >=4.0  :  5.2.1 (OK)
sympy >=0.7.3    :  None (NOK)
cython >=0.21    :  None (NOK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.1.0 (OK)
pylint >=0.25    :  1.7.2 (OK)

@ccordoba12
Copy link
Member

Thanks for reporting. We'll take a look at this after we release 3.2.2

@kohr-h kohr-h changed the title Closing last open while being in non-existing working dir raises exception Closing last open file while being in non-existing working dir raises exception Aug 31, 2017
@ccordoba12 ccordoba12 modified the milestones: v3.2.3, v3.2.4 Sep 8, 2017
@ccordoba12
Copy link
Member

@rlaverde, please work on 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