Scripts and plugins written for 5.1 will not necessarily work for 5.99, they need to be adapted.
In your case LoadBoard() is fine, it’s GetModules() that is throwing because it was renamed to GetFootprints()
that error is associated with pcbnew and LoadBoard. Its returned None (ie a silent error occured) rather than an object.
The script expects a pcbnew board object and thus the next step is a method call will fail on a None type.
This is exactly the same error from the 1st post, just occuring at a different point.
This isn’t a Kicad bug, but a 3rd party penalization bug. why open an issue on Kicad? especially since the python API is in flux? Expect this to be closed
I reported both! I also understand that the loadboard returns the none, but I’m not sure there is a bug in the loadboard function. Or I use errors caused, I hope someone to test it!
At the moment it is not possible to use the LoadBoard API inside the scripting console or an action plugin. You can use GetBoard to get the board that is loaded in the PCB editor, but you cannot load a different board (that is not loaded in the PCB editor).
Some time ago LoadBoard is normal, the use of its plug-in can also run normally, is the recent error, hope to stabilize API as soon as possible, I have been using kicad5.99, it is very useful, thank you very much for the efforts of developers! Looking forward to the release of version 6.0.