Skip to content

Mods with Required/RequiredMsg in changes.ini for a specific namespace cannot be selected for installation #55

@th3w1zard1

Description

@th3w1zard1

I just finished testing out installing Revision 11 of the KOTOR 1 Mod Build with Holopatcher 1.6.0b4 on Linux and was able to install all but two mods without modifications:
https://deadlystream.com/files/file/1365-k1-republic-soldiers-new-shade/
https://deadlystream.com/files/file/1101-dodonna%E2%80%99s-transmission/

Dodonna’s Transmission 1.1 has a RequiredMsg=0 line under [Settings] in changes.ini which causes the following error:

2025-03-13 11:59:17,001 - root - ERROR - An unexpected error occurred while loading the patcher namespace.
Traceback (most recent call last):
  File "holopatcher/__main__.py", line 844, in on_namespace_option_chosen
  File "pykotor/tslpatcher/reader.py", line 252, in load_settings
ValueError: Required files definitions must match required msg count (0/1)

----------------------------------------------------------------
 Exception 'Required files definitions must match required msg count (0/1)' of type '<class 'ValueError'>' occurred.
Stack Trace Variables:

Function 'on_namespace_option_chosen' at /tmp/_MEIGPCfyE/holopatcher/__main__.pyc:844:
  event = Event(
    <tkinter.Event object at 0x7f1d68942220>
  config_reader = None
  namespace_option = PatcherNamespace(
    namespace_id='Standard',
    ini_filename='changes.ini',
    info_filename='info.rtf',
    data_folderpath=PurePosixPath(.),
    name='Standard version',
    description='Installs Dodonna’s Transmission mod: Standard version.'
)
  changes_ini_path = CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Dodonna's_Transmission_v1.1/tslpatchdata/changes.ini")
  reader = ConfigReader(
    previously_parsed_sections={'Settings'},
    ini=ConfigParser(
        _sections={'Settings': {'FileExists': '1', 'WindowCaption': 'Dodonna’s Transmission Standard', 'ConfirmMessage': 'Ready to install?', 'LogLevel': '3', 'InstallerMode': '1', '...,
    mod_path=CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Dodonna's_Transmission_v1.1/tslpatchdata"),
    log=PatchLogger(
        all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7f1d6857ae80>],
        verbose_observable=Observable(
            callbacks=[]
        ),
        note_observable=Ob...,
    config=PatcherConfig(
        window_title='Dodonna’s Transmission Standard',
        confirm_message='Ready to install?',
        game_number=None,
        required_files=[],
        required_message...
)
  e = ValueError('Required files definitions must match required msg count (0/1)')
  self = App(
    root=<tkinter.Tk object .>,
    install_running=False,
    task_running=False,
    task_thread=None,
    mod_path="/home/synchro/Games/KOTORMods/mods/[K1]_Dodonna's_Transmission_v1.1",
    log_level=<LogLevel.WARNINGS: 3>,
    pykotor_logger=<RootLogger root (DEBUG)>,
    namespaces=[<pykotor.tslpatcher.namespaces.PatcherNamespace object at 0x7f1d6854afd0>, <pykotor.tslpatcher.namespaces.PatcherNamespace object at 0x7f1d68538e20>],
    logger=PatchLogger(
        all_logs=[],
        verbose_observ...<truncated>

Function 'load_settings' at /tmp/_MEIGPCfyE/pykotor/tslpatcher/reader.pyc:252:
  self = ConfigReader(
    previously_parsed_sections={'Settings'},
    ini=ConfigParser(
        _sections={'Settings': {'FileExists': '1', 'WindowCaption': 'Dodonna’s Transmission Standard', 'ConfirmMessage': 'Ready to install?', 'LogLevel': '3', 'InstallerMode': '1', '...,
    mod_path=CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Dodonna's_Transmission_v1.1/tslpatchdata"),
    log=PatchLogger(
        all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7f1d6857ae80>],
        verbose_observable=Observable(
            callbacks=[]
        ),
        note_observable=Ob...,
    config=PatcherConfig(
        window_title='Dodonna’s Transmission Standard',
        confirm_message='Ready to install?',
        game_number=None,
        required_files=[],
        required_message...
)
  settings_section = 'Settings'
  settings_ini = CaseInsensitiveDict.from_dict({'FileExists': '1', 'WindowCaption': 'Dodonna’s Transmission Standard', 'ConfirmMessage': 'Ready to install?', 'LogLevel': '3', 'InstallerMode': '1', 'BackupFiles': '1', 'PlaintextLog': '1', 'RequiredMsg': '0', 'LookupGameFolder': '0', 'LookupGameNumber': '1', 'SaveProcessedScripts': '0'})
  key = 'SaveProcessedScripts'
  value = '0'
  lower_key = 'saveprocessedscripts'
Traceback (most recent call last):
  File "holopatcher/__main__.py", line 844, in on_namespace_option_chosen
  File "pykotor/tslpatcher/reader.py", line 252, in load_settings
ValueError: Required files definitions must match required msg count (0/1)

----------------------------------------------------------------

[K1] Republic Soldier's New Shade 1.1.1 has a Required=pfbbl.mdl line under [Settings] in changes.ini in the Option3 and Required=n_repsold_f.mdl line under [Settings] in changes.ini in the Option5 namespace which causes the following error:

2025-03-13 09:30:34,422 - root - ERROR - An unexpected error occurred while loading the patcher namespace.
Traceback (most recent call last):
  File "holopatcher/__main__.py", line 844, in on_namespace_option_chosen
  File "pykotor/tslpatcher/reader.py", line 252, in load_settings
ValueError: Required files definitions must match required msg count (1/0)

----------------------------------------------------------------
 Exception 'Required files definitions must match required msg count (1/0)' of type '<class 'ValueError'>' occurred.
Stack Trace Variables:

Function 'on_namespace_option_chosen' at /tmp/_MEIlea8pO/holopatcher/__main__.pyc:844:
  event = <VirtualEvent event x=0 y=0>
  config_reader = None
  namespace_option = PatcherNamespace(
    namespace_id='Option_3',
    ini_filename='Option_3.ini',
    info_filename='Option_3.rtf',
    data_folderpath=PurePosixPath(New_Shade),
    name='Option-3: New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female',
    description='Need to have JC\'s "Republic Soldier Fix for K1" installed first, as this option will not work without the models from that mod. This will install the new shade version of both male and f...
)
  changes_ini_path = CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Republic_Soldier's_New_Shade_v1.1.1/tslpatchdata/New_Shade/Option_3.ini")
  reader = ConfigReader(
    previously_parsed_sections={'Settings'},
    ini=ConfigParser(
        _sections={'Settings': {'FileExists': '1', 'WindowCaption': 'New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female', 'ConfirmMessage': 'Proceed if you have ...,
    mod_path=CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Republic_Soldier's_New_Shade_v1.1.1/tslpatchdata/New_Shade"),
    log=PatchLogger(
        all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7f105f3d1820>],
        verbose_observable=Observable(
            callbacks=[]
        ),
        note_observable=Ob...,
    config=PatcherConfig(
        window_title='New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female',
        confirm_message='Proceed if you have "JC\'s Republic Soldier Uniform for P...
)
  e = ValueError('Required files definitions must match required msg count (1/0)')
  self = App(
    root=<tkinter.Tk object .>,
    install_running=False,
    task_running=False,
    task_thread=None,
    mod_path="/home/synchro/Games/KOTORMods/mods/[K1]_Republic_Soldier's_New_Shade_v1.1.1",
    log_level=<LogLevel.FULL: 4>,
    pykotor_logger=<RootLogger root (DEBUG)>,
    namespaces=[<pykotor.tslpatcher.namespaces.PatcherNamespace object at 0x7f105f3b60a0>, <pykotor.tslpatcher.namespaces.PatcherNamespace object at 0x7f105f3b61c0>, <pykotor.tslpatcher.namespaces.Patcher...,
    logger=PatchLogge...<truncated>

Function 'load_settings' at /tmp/_MEIlea8pO/pykotor/tslpatcher/reader.pyc:252:
  self = ConfigReader(
    previously_parsed_sections={'Settings'},
    ini=ConfigParser(
        _sections={'Settings': {'FileExists': '1', 'WindowCaption': 'New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female', 'ConfirmMessage': 'Proceed if you have ...,
    mod_path=CaseAwarePath("//home/synchro/Games/KOTORMods/mods/[K1]_Republic_Soldier's_New_Shade_v1.1.1/tslpatchdata/New_Shade"),
    log=PatchLogger(
        all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7f105f3d1820>],
        verbose_observable=Observable(
            callbacks=[]
        ),
        note_observable=Ob...,
    config=PatcherConfig(
        window_title='New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female',
        confirm_message='Proceed if you have "JC\'s Republic Soldier Uniform for P...
)
  settings_section = 'Settings'
  settings_ini = CaseInsensitiveDict.from_dict({'FileExists': '1', 'WindowCaption': 'New Shade for JC\'s "Republic Soldier Uniform for PC" - Male and Female', 'ConfirmMessage': 'Proceed if you have "JC\'s Republic Soldier Uniform for PC" installed [there will be error message if you didn\'t have the required model]', 'Required': 'pfbbl.mdl', 'LogLevel': '4', 'InstallerMode': '1', 'BackupFiles': '1', 'PlaintextLog': '0', 'LookupGameFolder': '0', 'LookupGameNumber': '1', 'SaveProcessedScripts': '0'})
  key = 'SaveProcessedScripts'
  value = '0'
  lower_key = 'saveprocessedscripts'
  these_files = ('pfbbl.mdl',)
Traceback (most recent call last):
  File "holopatcher/__main__.py", line 844, in on_namespace_option_chosen
  File "pykotor/tslpatcher/reader.py", line 252, in load_settings
ValueError: Required files definitions must match required msg count (1/0)

----------------------------------------------------------------

I peeked around the source based on the issue I got and found this commit: NickHugi/PyKotor@4af037b, so it seems like something is not being accounted for.

Presumably these mods are giving a bad or unaccounted for (most likely) value for these two options.

Removing the bad options from the affected mods (and assuming the required files are present in the case of Republic Soldier's New Shade) has them working fine, just seems to be getting caught up with those lines.


Migrated from: NickHugi/PyKotor#111
Original author: @ProjectSynchro
Original created: 2025-03-13T16:44:37Z

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions