cdp1337 / Valheim-Mod-Manager

Mod manager for Valheim using thunderstore.io as its backend
GNU General Public License v3.0
5 stars 2 forks source link

Removing and reinstalling and other issues #1

Closed theniwo closed 9 months ago

theniwo commented 11 months ago

Selecting remove from the menu doesn't remove the mod. Debug reports, that it just copies it

DEBUG:root:Copying file to /home/valheim/serverfiles/doorstop_libs/libdoorstop_x64.dylib
Selected mod has been removed

Reinstalling a mod fails with following error as long as .cache/removed.json exists

Installing BepInExPack_Valheim v5.4.2105
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

ENTER to resume, CTRL+C to stop: 
DEBUG:root:Installing BepInExPack_Valheim 5.4.2105
DEBUG:root:.cache/packages/BepInExPack_Valheim-5.4.2105.zip already in cache, skipping download
DEBUG:root:Extracting BepInExPack_Valheim-5.4.2105.zip to client/
Traceback (most recent call last):
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 458, in <module>
    menu_main()
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 92, in menu_main
    run = _menu(
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 76, in _menu
    return sel()
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 230, in install_new
    mod.install()
  File "/home/valheim/Valheim-Mod-Manager/manager.py", line 219, in install
    ModPackages.update_installed_cache(self, v.version)
  File "/home/valheim/Valheim-Mod-Manager/manager.py", line 597, in update_installed_cache
    del(cls.removed[cls.index(pkg.name)])
AttributeError: type object 'ModPackages' has no attribute 'index'

If remove is selected and no mod is installed, the following error message may appear:

Uninstalling Mod

Traceback (most recent call last):
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 458, in <module>
    menu_main()
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 92, in menu_main
    run = _menu(
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 76, in _menu
    return sel()
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 388, in remove
    opt = _menu(title='Uninstalling Mod', options=opts, back=True, default='b')
  File "/home/valheim/Valheim-Mod-Manager/./cli.py", line 36, in _menu
    space = math.floor(math.log10(len(options))) + 1
ValueError: math domain error
cdp1337 commented 9 months ago

These issues should be resolved in the latest commit, when you have time, feel free to retest with the updated code, and let me know if you experience any additional issues.

Also thanks for submitting a bug report! (Sorry it took me a while to circle back to it; works been a little crazy.)

cdp1337 commented 9 months ago

Since I have not received a response, I'll mark this as closed. I believe it's fixed, (at least works for me now). If you have further issues, feel free to reopen this ticket or create a new one.