Spyder: Spyder open file dialog doesn't show special/hidden files on macOS

Created on 15 Jul 2016  路  23Comments  路  Source: spyder-ide/spyder

Description of your problem

What steps will reproduce the problem?

  1. Open spyder 3.0.0beta4 (anaconda installation on OS X 10.11.5)
  2. Click on Open File button
  3. Using new open file dialog attempt to locate special/hidden files that are visible in the finder
  4. Files aren't visible (see screen shot below; dialog on left, Finder window on right)

spydernoshowhidden

Versions and main components

  • Spyder Version: 3.0.0beta4
  • Python Version: Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec 6 2015, 18:57:58)
  • Operating system: OS X 10.11.5

    Dependencies

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.4.3 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.9.2 (OK)
pandas >=0.13.1 : None (NOK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 4.3.0 (OK)
pyflakes >=0.5.0 : 1.2.3 (OK)
pygments >=2.0 : 2.1.3 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.4.1 (OK)
sympy >=0.7.3 : None (NOK)
PyQt = 5.6
Qt = 5.6.0

MacOS Editor Bug

All 23 comments

I think to fix this we need to change the filter for All files. Thanks for reporting it :-)

On linux there is a context menu to show or hide hidden files. It's not the same on OSX ?

@Nodd the default looks like this:
spyder_optionsdefault
And toggling Options leads to:
spyder_optionstoggle

It's 2020 and I still can't open my .ipython directory in Spyder... Any update? :))

No longer the case with 4.x

Screen Shot 2020-04-11 at 21 12 48

Closing @ccordoba12 ?

I use Spyder 4.1.2, MacOS Catalina 10.15.3, and my home directory (which indeed contains a .ipython directory), shows like this:
Screenshot 2020-04-12 at 11 04 32 am
Either I am doing something wrong with configuration (which is the most likely), or the problem is still there for MacOS.

Sorry I missed the open part. Will fix this:-)

Actually @MattACDC there is nothing to fix you need to use Cmd+Shift+. when you have the dialog open... that is the Mac Way

https://osxdaily.com/2011/03/01/show-hidden-files-in-mac-os-x-dialog-boxes-with-commandshiftperiod/

@goanpeca Oh, I see, it works, cheers mate!

@ccordoba12 @goanpeca it seems that the CMD+Shift+. works to view the files, but you can't select them to open the file in Spyder 4.1.2.

Or reading the above https://github.com/spyder-ide/spyder/issues/3291#issuecomment-612604777, maybe @goanpeca fixed this in 4.1.3, will update and try again.

@ccordoba12 @goanpeca bad news, this is still an issue for 4.1.3, so please reopen

Default open:
Screen Shot 2020-05-27 at 2 41 54 PM
CMD+Shift+. open:
Screen Shot 2020-05-27 at 2 42 01 PM
But unfortunately, the .dotfiles aren't selectable to open

@goanpeca thanks. As an FYI, I am currently on MacOS 10.14.6, let me know if you want any other diagnostic info

@goanpeca as a workaround, you can still drag and drop a file into the editor window so while it's a bit annoying, Spyder 4.1.3 can still edit these files (assuming you can figure out the drag and drop open)

Is this possible in other editors or IDEs, e.g. VSCode? If not, I'd say we should close this one because it really doesn't have to do with Spyder but with the open dialog provided by macOS. Besides, the files can be opened from Files just fine.

Yep, see below
Screen Shot 2020-05-27 at 3 15 53 PM
[VSCode 1.40.1, and also tested after updating to 1.45.1]

Maybe this could help: https://www.qtcentre.org/threads/67923-Get-QFileDialog-to-display-dot-folder-files

Although I think we currently use the static method getopenfilenames to get the files to open and that doesn't receive the filter flags (like QDir.Hidden)

Thanks for the heads up @dalthviz and @durack1. I will try to get this fixed for the next 4.1.4 release.

Cheers!

I'm on MacOS Catalina and came to this thread because I had set invisible files to visible (cmd+shift+.) and couldn't see them. But as stated above, if I used cmd+shift+. again while the dialog box was open, the invisible files became visible. Unlike durack1, I was able to select the invisible files and open them. So all good for me with latest Catalina and latest Spyder.

@ptoche interesting, I just tried the same approach on 10.14.6 and it's not the same. So before opening a Spyder instance, issue cmd+shift+. and .files become visible in the finder. Then open Spyder 4.1.3, select the open dialog, navigate to the same directory and can't see the files, issue cmd+shift+. while the dialog is open, files become visible BUT not selectable. It's interesting to know this behavior differs across MacOS releases

@durack1 , I wonder if it's specific to the files you're trying to open. I see from the screenshot that they may be executables. If you have a simple python text file, say you try to open tmp.py in the .spyder-py3 directory, does it work?

@ptoche interesting idea, the perms for the files are below

drwxr-xr-x   9  288 Jun 12 07:26 .
drwxr-xr-x  51 1632 May 21 10:33 ..
-rw-r--r--@  1 6148 Jun 12 07:26 .DS_Store
-rwxr-xr-x   1 9250 May 29 17:27 .aliases
-rw-r--r--   1  892 May 21 13:23 .bash_profile
-rwxr-xr-x   1 1271 May 21 11:17 .exports
drwxr-xr-x  13  416 May 21 13:22 .git
-rwxr-xr-x   1  173 May 21 11:09 .paths
-rw-r--r--   1    5 Jun 12 07:26 test.py

The perm differences between .paths and .bash_profile would suggest this isn't the case to me
Screen Shot 2020-06-12 at 7 30 56 AM

@ccordoba12 @goanpeca thanks folks, 4.1.4 works a treat!
Screen Shot 2020-07-24 at 9 17 37 AM

Was this page helpful?
0 / 5 - 0 ratings