Yacoby / Wrye-Mash

Fork of Wrye's Wrye Mash
18 stars 19 forks source link

Uninstalling Loaded Mods #32

Open ghost opened 12 years ago

ghost commented 12 years ago

Mash doesn't check to see if a mod is currently loaded, under the Mod tab, before uninstalling that mod. This causes the Mod tab to consistently issue 'KeyError' exceptions, and you can't unload the mod because of this.

Mash should warn the user and then either a) refuse to uninstall the mod until it is unloaded manually, b) unload the mod for the user and then uninstall it, or c) let the user decide whether to perform (a) or (b).

WryeMash.log:

Wrye Mash Log!
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 4476, in Execute
    globals.gInstallers.RefreshUIMods()
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 2047, in RefreshUIMods
    if bosh.modInfos.refresh():
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 3032, in refresh
    self.unload(loadFile)
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 3144, in unload
    mwIniFile.unload(fileName,False)
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2403, in unload
    self.refreshDoubleTime()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2336, in refreshDoubleTime
    mtime = modInfos[loadFile].mtime
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'LeFemmArmor.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'entertainers.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'bcsounds.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'master_index.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\gui\__init__.py", line 334, in DoItemMenu
    link.AppendToMenu(menu,self,selected)
  File "D:\games\Morrowind\Mopy\mash\balt.py", line 1308, in AppendToMenu
    link.AppendToMenu(subMenu,window,data)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 3502, in AppendToMenu
    self.fileInfo = window.data[data[0]]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'LeFemmArmor.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1014, in OnLeftDown
    oldDTFiles = mosh.mwIniFile.getDoubleTimeFiles()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2368, in getDoubleTimeFiles
    if self.doubleTime[modInfos[loadFile].mtime]:
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1014, in OnLeftDown
    oldDTFiles = mosh.mwIniFile.getDoubleTimeFiles()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2368, in getDoubleTimeFiles
    if self.doubleTime[modInfos[loadFile].mtime]:
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 14669, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "D:\games\Morrowind\Mopy\mash\mash.py", line 14, in write
    s.write(message)
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1014, in OnLeftDown
    oldDTFiles = mosh.mwIniFile.getDoubleTimeFiles()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2368, in getDoubleTimeFiles
    if self.doubleTime[modInfos[loadFile].mtime]:
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1014, in OnLeftDown
    oldDTFiles = mosh.mwIniFile.getDoubleTimeFiles()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2368, in getDoubleTimeFiles
    if self.doubleTime[modInfos[loadFile].mtime]:
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'master_index.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'bcsounds.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'entertainers.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1030, in OnItemSelected
    self.details.SetFile(modName)
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1261, in SetFile
    modInfo = self.modInfo = mosh.modInfos[fileName]
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'LeFemmArmor.esp'
Traceback (most recent call last):
  File "D:\games\Morrowind\Mopy\mash\masher.py", line 1014, in OnLeftDown
    oldDTFiles = mosh.mwIniFile.getDoubleTimeFiles()
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2368, in getDoubleTimeFiles
    if self.doubleTime[modInfos[loadFile].mtime]:
  File "D:\games\Morrowind\Mopy\mash\mosh.py", line 2727, in __getitem__
    return self.data[key]
KeyError: u'AreaEffectArrows.esp'
Sharlikran commented 7 years ago

This should be resolved now in https://github.com/Wrye-Code-Collection/Wrye-Mash/commit/8d13f47be78f143219892c807dc1ca616b5138a9