`TypeError` from selecting Input Folder
Avasam opened this issue · 3 comments
Avasam commented
Steps:
- Double click nsz.exe to open
- Click "Select Input File/Folder"
- Select my folder containing all my NSP backups. Note that this folder contains some NSP files directly (when I have a base game with no update or extra data) and some folders (base game + update, extra saves backups, etc).
- See the following log in the console:
Error while adding E:\Users\Avasam\Documents\Backups & Mods\Switch\NSP Files to gamelist: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "E:\Users\Avasam\Documents\Backups & Mods\Switch\nsz_v4.5.0_win64_portable\lib\site-packages\nsz\gui\GameList.py", line 128, in addFiles
(titleIDExtracted, versionExtracted) = FileExistingChecks.ExtractTitleIDAndVersion(filepathStr)
TypeError: cannot unpack non-iterable NoneType object
NSZ version 4.5.0
nicoboss commented
This means that the extraction of the TitleId/Version failed for some files in this folder. Maybe they are corrupted, are some strange files that have nothing to do with actual game dumps or your prod.keys is outdated.
I guess a nicer way to handle this case is to either add those files using an unknown TitleId/Version or don't add them and instead show a warning in the console for every file that got skipped. It is really unfortunate that the error message doesn’t show you for which file the TitleId/Version can’t be extracted.
Avasam commented
All of these are possible in my case.
- I don't think I have a bad dump, but a few months ago my Hard Drive had too many bad sectors and started corrupting some files (I don't remember my dumps being affected, but it's possible). Also data rot.
- Save files. Or something else unrelated I may have left in a folder by accident?
- I may have copied an outdated prod keys backup into
.switch
. I don't think so? But maybe 🤷
I agree at least a warning + skip might be a more graceful failure that gives a bit more information.
Avasam commented