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

[Bug]: Error when accessing hidden folder causing program to crash #810

Open
3 tasks done
spyingcreeper09 opened this issue Feb 19, 2025 · 4 comments
Open
3 tasks done
Labels
Priority: High An important issue requiring attention System: Windows For Microsoft Windows Type: Bug Something isn't working as intended Type: File System File system interactions

Comments

@spyingcreeper09
Copy link

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha 9.4.2

Operating System & Version

Windows 10

Description

There is a folder I want hidden on my computer but I also want to use this tool. When I want to use the tool I have no issue having to manually unhide the folder to use TagStudios but what I dont like is how it gives this long error message and just crashes. I have to unhide the folder first in otder to even get the program to open so I can use it (this includes if i want to open a different library)

Expected Behavior

I think that it sould provide a very basic error message within the center of the page (Where is says "Opening library 'folder path here'") that says "Cannot access previous library"

What happens
What I want to happen
What heppens (without error box)

Steps to Reproduce

  1. Create a new library in a folder
  2. Close tag studios
  3. Go into the folder properties and check "Hidden" then apply
  4. Open tag studios
  5. Wait for error

Logs

Failed to execute script 'tag_studio' due to unhandled exception: input(): lost sys.stdin

Traceback (most recent call last):
File "tag_studio.py", line 75, in main
File "src\qt\ts_qt.py", line 638, in start
self.open_library(Path(lib))
File "src\qt\ts_qt.py", line 1836, in open_library
return_code = self.lib.open_library(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "src\core\library.py", line 748, in open_library
self.save_library_backup_to_disk(is_auto=True)
File "src\core\library.py", line 856, in save_library_backup_to_disk
with open(
^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\Users\SC09\OneDrive\Desktop\⠀\.TagStudio\backups\ts_library_backup_auto.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tag_studio.py", line 83, in
File "tag_studio.py", line 79, in main
RuntimeError: input(): lost sys.stdin

@spyingcreeper09 spyingcreeper09 added the Type: Bug Something isn't working as intended label Feb 19, 2025
@spyingcreeper09
Copy link
Author

Sorry, forgot to add descriptions to the images. The first one is what happens, the second one is what i want to happen, the third is what is shown behind the white box. The program crashes when i close the white box (i just hide it to get the screenshot)

@kitsumed
Copy link
Contributor

kitsumed commented Feb 21, 2025

Until that error get properly handled, have you tried to disable the option that automatically load the library when the app start?

This should prevent the exception from happening when you move your library folder to a new location. (Altrought the error message says Access denied and not File not found, not too sure about that part)

EDIT: If you could try to replicate your issue on the latest pre-release availabe to verify if it is already fixed on the future version that would help too.

@CyanVoxel CyanVoxel added Priority: High An important issue requiring attention Type: File System File system interactions System: Windows For Microsoft Windows labels Feb 21, 2025
@CyanVoxel CyanVoxel moved this to 🛠 Ready for Development in TagStudio Development Feb 21, 2025
@spyingcreeper09
Copy link
Author

I disabled it in the options menu and that fixed it. I will recreate the bug on the latest pre-release when I get a chance

@kitsumed
Copy link
Contributor

I don't think making a new issue is the best aproach, it would just create a duplicate. Reporting here if it also affect the latest pre-release seems more straight forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High An important issue requiring attention System: Windows For Microsoft Windows Type: Bug Something isn't working as intended Type: File System File system interactions
Projects
Status: 🛠 Ready for Development
Development

No branches or pull requests

3 participants