sammko/picomc

Forge promotions_slim.json changed format and broke version selector

Closed this issue · 1 comments

Traceback (most recent call last):
  File "/home/sammko/.local/bin/picomc", line 33, in <module>
    sys.exit(load_entry_point('picomc', 'console_scripts', 'picomc')())
  File "/home/sammko/src/picomc/picomc/__init__.py", line 18, in main
    picomc_cli()
  File "/usr/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  [Previous line repeated 1 more time]
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/sammko/src/picomc/picomc/mod/forge.py", line 333, in install_cli
    install(
  File "/home/sammko/src/picomc/picomc/mod/forge.py", line 231, in install
    game_version, forge_version, version = resolve_version(
  File "/home/sammko/src/picomc/picomc/mod/forge.py", line 115, in resolve_version
    game_version, forge_version = best_version_from_promos(promos, game_version)
  File "/home/sammko/src/picomc/picomc/mod/forge.py", line 81, in best_version_from_promos
    bestmcobj = max(promos, key=lambda obj: _version_as_tuple(obj["mcversion"]))
  File "/home/sammko/src/picomc/picomc/mod/forge.py", line 81, in <lambda>
    bestmcobj = max(promos, key=lambda obj: _version_as_tuple(obj["mcversion"]))
TypeError: string indices must be integers

This was fixed in 64285b3