Missing argument 2 for a custom function widgets_init

widgets_init isn’t a function, it’s an action hook. The callback you specify for that hook is generate_sidebars which requires two parameters, but the widgets_init hook doesn’t pass any parameters to its callbacks.

I think what you’re trying to do is this:

add_action( 'widgets_init', 'call_sidebar_function' );

Which will call the call_sidebar_function() function which will then call the generate_sidebars() function with the correct parameters.