RecursionError: Maximum recursion depth exceeded in comparison

I got this error :

RecursionError: maximum recursion depth exceeded in comparison

when I was trying to run this line:

bert = TFAutoModel.from_pretrained('bert-base-cased')

Also, I increased the maximum recursion amount in sys.
I wanted this to fine-tune a model.