cyberrumor / ammo

Almost Manual Mod Organizer - Linux MO for Bethesda Games
GNU General Public License v2.0
25 stars 6 forks source link

Crash when using FOMOD installer on final step #9

Closed Nucleartaxi closed 1 year ago

Nucleartaxi commented 1 year ago

Hi, I'm using the program to install mods, but ran into this issue while configuring Relighting Skyrim SE. It crashed on the second and last page of the FOMOD installer when I hit n for next to finish up the install.

It seems to be in the main for loop for node in to_install, looks like it didn't get a string from node.get("source") because node (the folder in the list) doesn't have text associated with it. I just downloaded so I haven't been able to dive into the code much, but looks like the bug might be somewhere in the gathering the folders area in the configure function.

I am using python version 3.10.10 on arch and I pulled off of the latest commit in main.

Thanks!

File "/home/test/Documents/repos/source/ammo/ammo/ammo.py", line 76, in <module>
    sys.exit(ui.repl())
  File "/home/test/Documents/repos/source/ammo/ammo/ui.py", line 410, in repl
    if not (ret := command["func"](*args)):
  File "/home/test/Documents/repos/source/ammo/ammo/ui.py", line 351, in configure
    self.controller._init_fomod_chosen_files(index, to_install)
  File "/home/test/Documents/repos/source/ammo/ammo/controller.py", line 431, in _init_fomod_chosen_files
    for i in s.split('\\'):
AttributeError: 'NoneType' object has no attribute 'split'
cyberrumor commented 1 year ago

Confirmed, this bug is new as of today. This is caused by some mods treating files to install as lists and some mods treating files to install as individual items. To fix this, I need to ensure everything gets flattened to a one dimensional list (ie: not nested) before it gets passed to the function that you see crashing.

This will probably take me a couple days to fix. I'd recommend reverting to cf5f990b83d40d003c0546d51eee8140c392c978 for now. You can do this by entering the directory you cloned ammo to and typing: git checkout cf5f990b83d40d003c0546d51eee8140c392c978

cyberrumor commented 1 year ago

Fixed in commit 0f4ca48b517fdbcac050cf3cdbf31d34b6c1a41f. If you had checked out that other commit for the workaround I'd mentioned, you can get back to the main branch like this:

git checkout main
git pull

Thanks for your patience and sorry for the bug. I don't have automated testing set up so that's totally on me.