Failed to import Trainer: unhashable type 'list

hi I am a “beginner”.
I am trying to import trained but it gives me the following error:

RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):
unhashable type: 'list'

all my code is trying to do is import the library and nothing else but the error still occurs.
I tried updating transformers, install and reinstall transformers and trainer but nothing helped.
I am using Python 3.9 and Windows.
I have litteraly found 0 cases online of the same error and I cannot possibly figure out what to do if a single simple import line is giving me errors.

can you please help me. this is much appreciated as this is also like the first case in the entire world of this happening that has been posted online as far as i know :hugs:

Solved!

use a different Python version. I used 3.9 before and had error, I switched to 3.11 and no more import errors.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.