Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

KeyError: 'Definition' #532

Closed
GingerAvalanche opened this issue Apr 18, 2023 · 1 comment
Closed

KeyError: 'Definition' #532

GingerAvalanche opened this issue Apr 18, 2023 · 1 comment

Comments

@GingerAvalanche
Copy link
Collaborator

          Hello, I'm having a problem as well, can't install any mod. Mine says 

Traceback (most recent call last):
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\install.py", line 295, in install_mod
tmp_dir = open_mod(mod)
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\install.py", line 122, in open_mod
upgrade.convert_old_mod(rulesdir, delete_old=True)
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\upgrade.py", line 38, in convert_old_mod
info = parse_rules(mod / "rules.txt")
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\upgrade.py", line 74, in parse_rules
"name": str(rules["Definition"]["name"]).strip(""' "),
File "c:\users\ushir\appdata\local\programs\python\python38\lib\configparser.py", line 960, in getitem
raise KeyError(key)
KeyError: 'Definition'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml_api.py", line 33, in status_run
data = func(*args, **kwargs)
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\install.py", line 264, in do_and_refresh
res = func(*args, **kwargs)
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml_api.py", line 380, in install_mod
mods = [
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml_api.py", line 381, in
install.install_mod(
File "c:\users\ushir\appdata\local\programs\python\python38\lib\site-packages\bcml\install.py", line 312, in install_mod
raise util.InstallError(err) from err
bcml.util.InstallError: An error occured when installing your mod. 'Definition'
Your mod is being removed, and no changes have been made.

Originally posted by @Ayaya70 in #436 (comment)

@GingerAvalanche
Copy link
Collaborator Author

This is due to the removal of the bnp upgrader in v3.10.5, which was done because the upgrader used code that didn't work on python 3.9 or above. It only affects very old bnp's. We didn't even realize that so many of those old bnp's were still in use.

We will not be adding the upgrader back in, for many reasons, but the most important is that we will not be making any more changes to bcml. Going forward, it's suggested that you use ukmm instead.

But if you absolutely must use old bnp's with bcml, make sure you are using python 3.7 or 3.8, and install the last bcml version that had the upgrader, with the console command pip install bcml==3.10.4

@GingerAvalanche GingerAvalanche closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
@GingerAvalanche GingerAvalanche pinned this issue Apr 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant