Skip to content
Advertisement

Why I am getting “add_item() takes 2 positional arguments but 3 were given” Moncli

Hello I am working on connecting a Scraper to Monday.com using Moncli.

Moncli Library

Here is my current code:

groups=obj.get_board(id=846185373).get_group(title='Pending')

item_name='Asim'
thisdict = {
  "text60": "Ford"
}
groups.add_item("asim",thisdict)

The Document Says this:

def add_item(self, item_name: str, *args, **kwargs):
        """Add item to this group.
        __________
        Parameters
            item_name : `str`
                The new item's name.
            args : `tuple`
                The list of item fields to return.
            kwargs : `dict`
                Optional keyword arguments for adding an item to this group.

If someone can help me out please do.

Advertisement

Answer

groups=obj.get_board(id=846185373).get_group(title=’Pending’)

item_name=’Asim’ thisdict = { “text60”: “Ford” } change this line groups.add_item(“asim”,column_values=thisdict)

This worked for me.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement