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] deleted folder crash #444

Open
maxmag-soft opened this issue Sep 21, 2022 · 1 comment
Open

[Bug] deleted folder crash #444

maxmag-soft opened this issue Sep 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@maxmag-soft
Copy link

maxmag-soft commented Sep 21, 2022

Describe the bug
This is a bug where the software crash when a folder gets deleted.

To Reproduce
Steps to reproduce the behaviour:
1 Run python3 nut_gui.py
2 Scan a folder and get some files listed on the window
3 Delete the folder that have been scanned or other folder inside the folder where files where located
4 close nut_gui and reopen
5 crash:

Traceback (most recent call last):
  File "/media/somefolder/nut/nut_gui.py", line 67, in <module>
    run()
  File "/media/somefolder/nut/nut_gui.py", line 44, in run
    nut.initTitles()
  File "/media/somefolder/nut/nut/__init__.py", line 631, in initTitles
    initFiles(verify=verify)
  File "/media/somefolder/nut/nut/__init__.py", line 641, in initFiles
    Nsps.load(verify=verify)
  File "/media/somefolder/nut/nut/Nsps.py", line 238, in load
    if cache.isfile(path) and not _is_file_hidden(path):
  File "/media/somefolder/nut/nut/Nsps.py", line 208, in isfile
    for f in os.listdir(parent):
FileNotFoundError: [Errno 2] No such file or directory: '/media/somefolder/games/etc'

Actual behaviour
Crash the software (Gui and Cli version)

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots

                        ,;:;;,
                       ;;;;;
               .=\',    ;:;;:,
              /_\', "=. \';:;:;
              @=:__,  \,;:;:\'
                _(\.=  ;:;;\'
               `"_(  _/="`
                `"\'
loaded titledb/titles.json in 1.0706207239991272 seconds
Traceback (most recent call last):
  File "/media/somefolder/nut/nut_gui.py", line 67, in <module>
    run()
  File "/media/somefolder/nut/nut_gui.py", line 44, in run
    nut.initTitles()
  File "/media/somefolder/nut/nut/__init__.py", line 631, in initTitles
    initFiles(verify=verify)
  File "/media/somefolder/nut/nut/__init__.py", line 641, in initFiles
    Nsps.load(verify=verify)
  File "/media/somefolder/nut/nut/Nsps.py", line 238, in load
    if cache.isfile(path) and not _is_file_hidden(path):
  File "/media/somefolder/nut/nut/Nsps.py", line 208, in isfile
    for f in os.listdir(parent):
FileNotFoundError: [Errno 2] No such file or directory: '/media/somefolder/games/etc'

NUT version (or git hash):

Additional context
To fix that, delete the file .../nut/titledb/files.json then start the application and rescan again

@maxmag-soft maxmag-soft added the bug Something isn't working label Sep 21, 2022
@some-git-user
Copy link

@maxmag-soft I will put this in an separate comment to highlight the workaround
To fix that, delete the file .../nut/titledb/files.json then start the application and rescan again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants