Ah, I think I know what the problem here.

self.data_layer.set_setting(name, value)

set_setting function does not exist. It should be setSetting I believe.