unexpectedpanda / retool

Retool: a better filter tool for Redump and No-Intro DAT files.
BSD 3-Clause "New" or "Revised" License
343 stars 22 forks source link

Crash when no titles in the input DAT match your preferences #300

Closed AlvaroBurnett closed 5 months ago

AlvaroBurnett commented 5 months ago

When running the command line retool, having filled user-config.yaml in a way that the resulting dat will turn empty (for example, asking for spanish titles in a WonderSwan dat), the program works but in the end it crashes with the following message:

Traceback (most recent call last):
  File "S:\ssd\host\programs\offline\retool\program-cli\retool.py", line 309, in <module>
    main()
  File "S:\ssd\host\programs\offline\retool\program-cli\retool.py", line 284, in main
    f'{str("{:,}".format(stats_final_count))} '
                         ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'stats_final_count' where it is not associated with a value
unexpectedpanda commented 5 months ago

It should never access the stats count if there's no titles found that match your preferences, so that's a bit odd.

I can't replicate this at this stage. Can you provide the following details for me to test?

unexpectedpanda commented 5 months ago

Accidental close, sorry.

AlvaroBurnett commented 5 months ago

I just discovered when it happens exactly. It is when the input is a directory instead of a specific .dat file.

unexpectedpanda commented 5 months ago

Fixed in v2.02.1.