0

Today while processing some files in Jupyter Notebook, I found that the list of files in Jupyter Notebook was not keeping up with what I was seeing in my file browser.

A similar thing was happening when I was working on a script earlier, when I would change the code, and run it in Git Bash or Powershell, I would get the same syntax errors (even when I commented out the whole file).

If I open Git Bash from Explorer I am able to see the updated files, as I would expect, but if I open Explorer from Git Bash, the files are missing. I understand that this is because the child programs inherit the permissions of their parents, but there still seems to be two sources of files that are out of sync.

The only thing that I have done today that I can think would cause damage to my file system is ending my python script from task manager and leaving a file lock open, but I don't get any related errors.

What I have Tried:

System Details

  • Windows 10
  • Git Bash v4.4.23(1)-release (x86_64-pc-msys)
  • Python 3.7.4

Here is a screenshot that shows one instance of Windows Explorer opened from command prompt and one opened from the GUI. Both the paths at the top of the windows are the same.

2
  • Are you sure the paths are identical? I can't be 100% certain because of the blacked-out username, but it looks like the one on the right has Documents as a component of the path, but the left doesn't. That is, the uas you're looking in on the left is directly inside the user profile folder, but the uas on the right is in your Documents folder.
    – Ben N
    Commented Nov 12, 2019 at 23:58
  • Hi @BenN, you are right, I used Git Bash to create a symlink from my user directory to the uas directory(using ln -s Documents/uas uas). Turns out that windows did not handle that well, because following the symlink and traveling the path have different results. Thank you very much.
    – Brojowski
    Commented Nov 13, 2019 at 0:39

1 Answer 1

0

As @BenN noted in the comments, the paths were not quite the same. I had created a symlink in Git Bash using:

ln -s Documents/uas uas

It turns out that the file trees of the symlink and the real directory did not stay in sync causing the issues I was seeing. Here is some more info about Git symlinks on windows:

https://stackoverflow.com/questions/5917249/git-symlinks-in-windows#16754068

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .