-
Notifications
You must be signed in to change notification settings - Fork 17
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
NoneType error on OSx #55
Comments
I believe there is a way to check if a view is a file on disk, and otherwise it sounds like something that might be try-catched. Let’s have a look 😊 |
@gerardroche can you check if #56 would help? |
braver
added a commit
that referenced
this issue
Jul 18, 2024
gerardroche
added a commit
to gerardroche/SideBarTools
that referenced
this issue
Jul 19, 2024
The new command uses the active view file name as the path from which to construct the new folder, but when the view is empty there is no real file on disk and the file name is None. The `os.path` functions like `isdir` and `exists` raise a NoneType exception when given None. This patch adds a NoneType check. Close braver#55 Re braver#56
braver
pushed a commit
that referenced
this issue
Jul 20, 2024
The new command uses the active view file name as the path from which to construct the new folder, but when the view is empty there is no real file on disk and the file name is None. The `os.path` functions like `isdir` and `exists` raise a NoneType exception when given None. This patch adds a NoneType check. Close #55 Re #56
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
re: gerardroche/NeoVintageousFiles#2
NeoVintageousFiles has a dependency on SideBarTools. The new folder command is throwing a NoneType error.
This happens when you try to create a new folder when the active view/pane is blank/empty.
Reproduction
Relevant line: https://github.com/braver/SideBarTools/blob/master/SideBar.py#L300
Looks like
get_path()
will returnNone
if the current active view is not a real file on disk.I'm not sure there is any way to fix this is there? Because until the file name or directory is passed to the command, which is what happens when you use the mouse right click menu, then there is no way for the command discover the path.
Currently, if the file name or directory is not passed, it uses the active view. But if that is not a real file on disk, then it's None.
So this might be a can't fix?
The text was updated successfully, but these errors were encountered: