"TypeError: 'NoneType' object is not subscriptable" on all commands that list downloaded mods
Ant-V opened this issue · comments
Description
All commands that list downloaded mods produce the following error:
Traceback (most recent call last):
File "/Users/~/Library/Python/3.9/bin/rmm", line 8, in <module>
sys.exit(run())
File "/Users/~/Library/Python/3.9/lib/python/site-packages/rmm/cli.py", line 548, in run
globals()[command](sys.argv, manager)
File "/Users/~/Library/Python/3.9/lib/python/site-packages/rmm/cli.py", line 96, in wrapper_func
func(*args, **kwargs)
File "/Users/~/Library/Python/3.9/lib/python/site-packages/rmm/cli.py", line 413, in order
tabulate_mod_or_wr(
File "/Users/~/Library/Python/3.9/lib/python/site-packages/rmm/cli.py", line 188, in tabulate_mod_or_wr
mod_list = [[n.packageid, n.name, n.author[:20], n.enabled] for n in mods]
File "/Users/~/Library/Python/3.9/lib/python/site-packages/rmm/cli.py", line 188, in <listcomp>
mod_list = [[n.packageid, n.name, n.author[:20], n.enabled] for n in mods]
TypeError: 'NoneType' object is not subscriptable
I have tested the following commands: list
, enable
, query
, disable
, order
and they all produce the same error.
I have tested the following commands and they do work: config
, sync
, sort
It used to work fine...
It could be due to an update in python, but I think that somehow some mods is lacking one of the parameters you are looping over
Info
OS: MacOS 12.6
RMM: 1.0.14
RimWorld: 1.3.3387 rev674
Nailed it down to which mod screws up the listing.
It is VE outposts. I think it might me because it has a list of Authors, instead of just one in the about.xml
<authors><li>legodude17</li><li>Oskar Potocki</li></authors>
After some digging around, the issue is the lack of an <author>
tag, as this mod has an <authors>
tag instead. You can dismiss it as a mod error, since most use <author>
, but <authors>
is also acceptable per this wiki article
I appreciate you taking the time to do the research and creating a patch.