Python macro gives error when started from formbutton-event

I have a simple python macro (based on ScriptForge) that opens a dialog. When I run it from Tools>Macros>Run Macro it works. Now I have connected it to the event execution of a form-button, but then I get an error: com.sun.star.unoRuntimeError. Error during invoking dlg…dlg takes 0 positional arguments but 1 was given.
LibreOffice base 7.6.1.2 with Firebird database.

def dlg():
    from scriptforge import CreateScriptService
    dlg = CreateScriptService('SFDialogs.Dialog', '/home/frie/Dropbox /accounting_development/boekhouding_template (copy).odb', 'Standard', 'kolommenbalans')
    dlg.Execute()

Every event passes an event struct. Basic ignores missing parameter declarations, Python does not. If you don’t need the event struct, declare an optional argument array.

def dlg(*args):

Thanks a Lot!! It works. I normally used basic but now I was practizing python with ScriptForge.