unexpectedpanda / retool

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

Crash due to mia tag with v1.10 #198

Closed Freeben666 closed 2 years ago

Freeben666 commented 2 years ago

Describe the bug The app crashes when analyzing the following DAT : Bit Corporation - Gamate (20220320-145154).dat

Processing file 37/197

* Reading dat file: "D:\Emulation\Tools\Retool\DATs\Bit Corporation - Gamate
  (20220320-145154).dat"
* Validating dat file... file is a Logiqx dat file.
* Converting dat file to a searchable format... done.
* Checking if the input dat is numbered... this isn't a numbered dat.
* Gathering stats... done.

|  DAT DETAILS
|  Description: Bit Corporation - Gamate
|  Author: Hiccup, relax
|  URL: http://www.no-intro.org
|  Version: 20220320-145154

Traceback (most recent call last):ld [70%]
  File "retool-gui.py", line 1020, in <module>
  File "retool-gui.py", line 622, in main
  File "retool.py", line 279, in main
  File "modules\xml.py", line 184, in dat_to_dict
  File "modules\classes.py", line 204, in __init__
  File "bs4\element.py", line 1486, in __getitem__
KeyError: 'mia'
[121788] Failed to execute script 'retool-gui' due to unhandled exception!

To reproduce Use retool v1.10 on the attached DAT (renamed to TXT so GitHub would let me upload it) Bit Corporation - Gamate (20220320-145154).txt

Expected behavior No crash

Operating system

Retool edition

Retool version 1.10

Are you using custom global or system filters? If so, list them below

Global excludes:

Global includes:

System excludes:

System includes:

What other settings are you using? Regions:

  1. France
  2. Europe
  3. World
  4. Unknown

Languages:

Freeben666 commented 2 years ago

I'm having the same error with these DATS:

There may be more, but I stopped after these

rafaeldpb commented 2 years ago

I think I understand what happened. Looking at some dats I had the same problem, it seems they all have some game with the substring 'mia' but are not Missing in Action and do not have 'mia=...' in the XML tag, so the KeyError happens. Is there a more reliable way to do this?

unexpectedpanda commented 2 years ago

Thanks for the heads up!

I think I understand what happened. Looking at some dats I had the same problem, it seems they all have some game with the substring 'mia' but are not Missing in Action and do not have 'mia=...' in the XML tag, so the KeyError happens. Is there a more reliable way to do this?

Exactly correct. A fix has been made and is out in 1.11.

Freeben666 commented 2 years ago

Thanks for the quick fix !