Error when exporting ScriptModule to ONNX

Greetings!
I have an issue with the torch.onnx.export method. I have a ScriptModule object that has been tested and works well. When I try to use the torch.onnx.export method to make the model into ONNX format, I get the following message:

command: torch.onnx.export(scripted_model, dummy_kek, ‘model.onnx’)
error message: * {AssertionError}example_outputs must be provided when exporting a ScriptModule

after adding an example_outputs argument in the function call I get another error message saying that this argument is unexpected:

command: torch.onnx.export(scripted_model, dummy_in, ‘model.onnx’, example_outputs=dummy_outp)
error message: * {TypeError}export() got an unexpected keyword argument ‘example_outputs’

How can this happen? Has anyone ever encountered such a problem?
Thank you for your time!