Error got multiple values for argument 'id_name'

I’m trying to make an web app, but there are error that says
TypeError: __init__() got multiple values for argument 'id_name'

  • at Courses, line 27
  • called from CourseItem, line 27

This is the syntax from line 27 (Course)
self.content_panel.clear()

This is the syntax from line 27 (CourseItem)
self.button_callback(self.name_label.text.lower())

this is the clone of the app

anyone please help me

The reason was that you had id_name defined in both the init method and in the custom component properties, it has to be one or the other. So I removed the id_name from the init method and changed a few lines of code with that in mind – you can revert those if you add back id_name in the init method and remove it from the custom component, but it’s usually better to have custom component properties.

There’s now a new error since the database is empty, so I left that to you since I don’t really know what your db is supposed to accomplish.

2 Likes