unexpectedpanda / retool

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

Unexpected error with user filtering #245

Closed cplr closed 1 year ago

cplr commented 1 year ago

A little bit of context for how I use retool: for most systems, I just run the amazing 1G1R filter on them. However for some systems, I want to filter the contents of the DATs to only include my favorite games. So after I do a batch 1G1R process on all the DATs (with user filters disabled), I then run retool on that previous step's output directory, but this time with user filters enabled (this is due to the fact that user filters can "break" the 1G1R functionality, as mentioned in the documentation). Using beta 7 I am getting an error with this process:

Retool 2.00.0 Beta 7
--------------------
* Reading DAT file: "/roms/ROMVault/retool/1G1R/Nintendo - Game Boy Advance (Parent-Clone)
  (20230321-143044) (Retool 2023-03-28 20-35-39) (1,059) (-z) [-AaBbcDdekmMoPpruv].dat"
* Validating DAT file... file is a Logiqx DAT file.

|  DAT DETAILS
|  Description: Nintendo - Game Boy Advance (Parent-Clone) (1,059) (-z) [-AaBbcDdekmMoPpruv]
   (20230321-143044) (Retool 2.00.0 Beta 7)
|  Author/s: aci68, Arctic Circle System, Aringon, Bent, BigFred, bikerspade, C. V. Reynolds,
   chillerecke, DeadSkullzJr, Densetsu, DeriLoko3, einstein95, ElBarto, Enker, Flashfire42,
   fuzzball, Gefflon, Hiccup, hking0036, hydr0x, InternalLoss, Jack, jimmsu, kazumi213,
   Larsenv, Lesserkuma, Madeline, MeguCocoa, Money_114, NESBrew12, niemand, nnssxx,
   norkmetnoil577, NovaAurora, omonim2007, Powerpuff, PPLToast, rarenight, relax, RetroGamer,
   Rifu, sCZther, SonGoku, Tauwasser, Tescu, togemet2, ufocrossing, Vallaine01, Whovian9369,
   xuom2, zg & Retool
|  URL: www.no-intro.org
|  Version: 20230321-143044
|  Numbered dat: No

* Processing DAT file |????????????????????? (!) 100.09% in 1.9s 
* Processing DAT file... done
* Applying clone list categories... done.
* Applying clone list overrides... done.
* Analyzing clone list variants... done.
* Applying category and user excludes... done.
* Removing titles without specified languages... done.
* Removing titles without specified regions... done.
* Selecting 1G1R titles |????????????????????| 4/4 [100%] in 0.4s 
* Selecting 1G1R titles... done
* Analyzing clone list variants... done.
* Applying user includes... 
Retool has had an unexpected error. Please raise an issue at
https://github.com/unexpectedpanda/retool/issues, attaching                                                                      
the DAT file that caused the problem and the following trace:                                                                    

Traceback (most recent call last):
  File "/roms/ROMVault/retool/retoolgui.py", line 167, in run
    retool.main(self.argument)
  File "/roms/ROMVault/retool/retool.py", line 217, in main
    processed_titles = IncludeExcludeTools.includes(processed_titles, input_dat.contents_dict, original_titles_with_clonelist, config, removes)
  File "/roms/ROMVault/retool/modules/titletools.py", line 537, in includes
    processed_titles[found_current_title.group_name].remove(found_current_title)
KeyError: '2 games in one! - dr. mario + puzzle league'

The error occurred on this file:
/roms/ROMVault/retool/1G1R/Nintendo - Game Boy Advance (Parent-Clone) (20230321-143044) (Retool 2023-03-28 20-35-39) (1,059) (-z) [-AaBbcDdekmMoPpruv].dat

DAT file + User Config YAML: Nintendo - Game Boy Advance DAT+UserConfig.zip

unexpectedpanda commented 1 year ago

Interesting use case :) And thanks for the in-depth report, it's nice to have this level of information to work with.

Unrelated: I see in your system config file that the video order isn't populated. I've seen that once before, but I couldn't replicate it. If your video order box is empty, that's why.

Related: Looks like compilation group reassignments are messing with the includes. It'll be fixed in beta 8.

cplr commented 1 year ago

When I was clicking from DAT file to DAT file to add in my user filters, I did notice that when viewing one DAT with User Filters, and then switching to another DAT that had no user config, the GUI was still displaying the old DAT's config info. When I would start to edit those fields, then it would create the user config file, but with undetermined data (is it populated with the old DAT info? I'm not sure as I was overwriting the values). It's possible that the bug about not populating the video order is related to this behavior.

unexpectedpanda commented 1 year ago

The only place I'm aware of when that happens is when multiple DATs are selected, but sounds like for you an event wasn't triggering at some point. I'll keep it mind while I'm digging around.

unexpectedpanda commented 1 year ago

Fixed in v2 beta 8.