'Load macros' button needs to be pressed manually when running macros from python

I’m currently trying to run automations from python, but when I run a script to run my macro, when uivision is opened no saved macros are loaded until I press the ‘load macros’ button so there is an error that the macro can’t be found (because it hasn’t been loaded when the uivision extension is opened). How can I make the macros automatically load when running uivision from python?