This is related to you script. I guess you tried to get some ports using get_ports for example. Enough positional arguments have been passed to the command.
You shoudl verify that the option given is not a misspelled dash option. If a list is provided directly instead of as a variable, ensure it is enclosed by curly braces or double quotation marks.
It would be helpful if you can provide some of your scripts.