I'm not familiar with the google apps API, but it appears that
orgunits.list() is defined like:
class FactoryObject(object):
# ... Code Here ...
def list(self, **kwargs):
if 'some_parameter' not in kwargs:
raise Exception('some_parameter required argument')
# ... code that uses kwargs['some_parameter']
return True
So if I run these commands:
>>> orgunits.list()
Exception: some_parameter required argument
>>> orgunits.list('my_customer')
TypeError: list() takes exactly 1 argument (2 given)
>>> orgunits.list(some_parameter='my_customer')
True
So next time you see the error, try adding the parameter name to your arguments list and see if that resolves your issue.
More information:
The dictionary unpack operator (**) doesn't act like a normal argument in a parameter list. If you pass a positional argument, when this is the only argument in the list, then it will throw an error (like you saw) because the code is expecting a keyword argument instead.
The unpack operator can accept arbitrary keyword arguments and use them in a dictionary.