Senth / minecraft-mod-manager

Install and update mods from CurseForge and Modrinth through a CLI
MIT License
75 stars 7 forks source link

Slight-gui-modifications or shuffle causes error #189

Closed Mistyttm closed 2 years ago

Mistyttm commented 2 years ago

Describe the bug

Slight-gui-modifications or shuffle causes error when updating mods

Steps to reproduce

Steps to reproduce the behavior:

  1. have slight-gui-modifications-2.1.0.jar and shuffle-4.0.0-fabric.jar
  2. run mmm -v 1.19 --mod-loader fabric --verbose

Expected Behavior

both mods should update correctly

Info

Error output


    🔍 Searching for mod
        🔍 Searching for slight-gui-modifications on Sites.curse
        🔍 Searching on Sites.curse
        🔍 Searching on Sites.modrinth
Traceback (most recent call last):
  File "C:\Users\****\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\****\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\****\AppData\Roaming\Python\Python310\Scripts\mmm.exe\__main__.py", line 7, in <module>
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\__main__.py", line 38, in main
    update.execute(config.arg_mods)
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\app\update\update.py", line 31, in execute
    self.find_download_and_install(mods_to_update)
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\app\download\download.py", line 35, in find_download_and_install
    mod.sites = self._finder.find_mod(mod)
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\gateways\api\mod_finder.py", line 63, in find_mod
    infos = api.search_mod(possible_name)
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\gateways\api\modrinth_api.py", line 53, in search_mod
    mods = self._search_mod(search)
  File "C:\Users\****\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\gateways\api\modrinth_api.py", line 73, in _search_mod
    for mod_info in json["hits"]:
KeyError: 'hits'```
Senth commented 2 years ago

Thanks for reporting!🙂

This seems to be related to #186, might be a duplicate of it. But keeping this open in case it's not a duplicate 🙂

Senth commented 2 years ago

Should be fixed in #197