TypeError: can only concatenate list (not "tuple") to list

I am encountering a TypeError while running the Trainer from my project in Google Colab. Despite my attempts to resolve it, I have not found a solution. Below is the error trace for reference:

Error trace.
TypeError Traceback (most recent call last)
in <cell line: 0>()
----> 1 trainer = Trainer(
2 model=base_model,
3 model_flops=model_flops,
4 total_steps=max_steps,
5 args=training_args,

2 frames
/content/utilities.py in init(self, model, model_flops, total_steps, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers)
242 optimizers=(None, None),
243 ):
→ 244 super(Trainer, self).init(
245 model,
246 args,

/usr/local/lib/python3.11/dist-packages/transformers/utils/deprecation.py in wrapped_func(*args, **kwargs)
163 warnings.warn(message, FutureWarning, stacklevel=2)
164
→ 165 return func(*args, **kwargs)
166
167 return wrapped_func

/usr/local/lib/python3.11/dist-packages/transformers/trainer.py in init(self, model, args, data_collator, train_dataset, eval_dataset, processing_class, model_init, compute_loss_func, compute_metrics, callbacks, optimizers, optimizer_cls_and_kwargs, preprocess_logits_for_metrics)
662 )
663 default_callbacks = DEFAULT_CALLBACKS + get_reporting_integration_callbacks(self.args.report_to)
→ 664 callbacks = default_callbacks if callbacks is None else default_callbacks + callbacks
665 self.callback_handler = CallbackHandler(
666 callbacks, self.model, self.processing_class, self.optimizer, self.lr_scheduler

TypeError: can only concatenate list (not “tuple”) to list

Issue Summary:

The error occurs when initializing the Trainer class. Specifically, the issue arises at this line in the transformers/trainer.py file:

The error message:

TypeError: can only concatenate list (not “tuple”) to list

suggests that callbacks is a tuple, while default_callbacks is a list. Since lists can only be concatenated with other lists (not tuples), this results in a TypeError.

is this error in the course environment notebook? or running codes locally?