Importing function in Python class got TypeError multiple values for argument

Solution 1:

When you call a method on an instance, self is passed implicitly, so you don't need to pass it explicitly.

self.create_scene_tab("Data Collection Preview",
                      initial_data_filepath=filepath)

This is actually doing something akin to

A.create_scene_tab(self, "Data Collection Preview",
                   initial_data_filepath=filepath)

So when you pass self explicitly as an argument, you're actually doing

A.create_scene_tab(self, self, "Data Collection Preview",
                   initial_data_filepath=filepath)

which is why you observe the extra argument getting passed from seemingly nowhere.