Crash on unrecognized mods #4

Open
opened 4 months ago by pandro · 0 comments
Owner

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 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 ```
pandro added the
bug
label 4 months ago
pandro referenced this issue from a commit 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pandro/LC_ModManager#4
Loading…
There is no content yet.