Mod manager crashes in set_installed_mods()
When there is a mod in installed_mods that has only a string (file name) and not a tuple as name (mod name, version)
How to reproduce
have a mod that is not recognized by the mod manager installed
Let the mod manager index all installed mods (e.g. during startup)
Oberserve crash
Error
Traceback (most recent call last):
File "/home/peery/Software_Projects/LethalCompanyModManager/main.py", line 7, in <module>
m = ModManager(log_level=logging.DEBUG)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peery/Software_Projects/LethalCompanyModManager/ModManager.py", line 56, in __init__
self.index_installed_mods()
File "/home/peery/Software_Projects/LethalCompanyModManager/ModManager.py", line 288, in index_installed_mods
self.__window.set_installed_mods(self.installed_mods)
File "/home/peery/Software_Projects/LethalCompanyModManager/window/main_window.py", line 75, in set_installed_mods
keys = [(name + "|" + version, (name, version)) for name, version in installed_mods] # TODO fix for unrecognized/unknown mods
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peery/Software_Projects/LethalCompanyModManager/window/main_window.py", line 75, in <listcomp>
keys = [(name + "|" + version, (name, version)) for name, version in installed_mods] # TODO fix for unrecognized/unknown mods
^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
Process finished with exit code 1
# Issue
Mod manager crashes in `set_installed_mods()`
When there is a mod in `installed_mods` that has only a string (file name) and not a tuple as name (mod name, version)
## How to reproduce
1. have a mod that is not recognized by the mod manager installed
2. Let the mod manager index all installed mods (e.g. during startup)
3. Oberserve crash
## Error
```
Traceback (most recent call last):
File "/home/peery/Software_Projects/LethalCompanyModManager/main.py", line 7, in <module>
m = ModManager(log_level=logging.DEBUG)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peery/Software_Projects/LethalCompanyModManager/ModManager.py", line 56, in __init__
self.index_installed_mods()
File "/home/peery/Software_Projects/LethalCompanyModManager/ModManager.py", line 288, in index_installed_mods
self.__window.set_installed_mods(self.installed_mods)
File "/home/peery/Software_Projects/LethalCompanyModManager/window/main_window.py", line 75, in set_installed_mods
keys = [(name + "|" + version, (name, version)) for name, version in installed_mods] # TODO fix for unrecognized/unknown mods
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peery/Software_Projects/LethalCompanyModManager/window/main_window.py", line 75, in <listcomp>
keys = [(name + "|" + version, (name, version)) for name, version in installed_mods] # TODO fix for unrecognized/unknown mods
^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
Process finished with exit code 1
```
Issue
Mod manager crashes in
set_installed_mods()
When there is a mod in
installed_mods
that has only a string (file name) and not a tuple as name (mod name, version)How to reproduce
Error