C1W2 Assignment - AttributeError: 'NoneType' object has no attribute 'set_model'

Whenever I run the the final codeblock I get this error, I don’t know where I’m wrong. So please help with this

AttributeError                            Traceback (most recent call last)
<ipython-input-22-1733272e84a3> in <module>
----> 1 hist = train_mnist(x_train, y_train)

<ipython-input-21-8b8c9b0a8baf> in train_mnist(x_train, y_train)
     27     # Fit the model for 10 epochs adding the callbacks
     28     # and save the training history
---> 29     history = model.fit(x_train, y_train, epochs=10, callbacks=[callbacks])
     31     ### END CODE HERE

/opt/conda/lib/python3.8/site-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
     65     except Exception as e:  # pylint: disable=broad-except
     66       filtered_tb = _process_traceback_frames(e.__traceback__)
---> 67       raise e.with_traceback(filtered_tb) from None
     68     finally:
     69       del filtered_tb

/opt/conda/lib/python3.8/site-packages/keras/callbacks.py in set_model(self, model)
    283       model.history = self._history
    284     for callback in self.callbacks:
--> 285       callback.set_model(model)
    287   def _call_batch_hook(self, mode, hook, batch, logs=None):

AttributeError: 'NoneType' object has no attribute 'set_model'

This happens because callbacks is set to None. Please fix it.

I fixed it, and successfully received the message but now the submission is not working.

It says

There was a problem grading your submission. Details:issubclass() arg 1 must be a class


Failed test case: hist has incorrect type.
<class 'keras.callbacks.History'>,
but got:
<class 'tuple'>.

Check for trailing comma. You might have something like history = model.fit(...) , or this return history,