Character sets not supported on windows11
Author: zengxiaosong
Pull request: no
Labels: name: Usage

name: bug

### System Info

`from transformers import Qwen2VLForConditionalGeneration,AutoTokenizer, AutoProcessor`

then there have some problem:
`Traceback (most recent call last):
  File "E:\codeProject\pythonProject\qwen2-VL\test.py", line 1, in <module>
    from transformers import Qwen2VLForConditionalGeneration, AutoTokenizer, AutoProcessor
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "D:\software\Anaconda3\envs\qwen2vl\lib\site-packages\transformers\utils\import_utils.py", line 1735, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "D:\software\Anaconda3\envs\qwen2vl\lib\site-packages\transformers\utils\import_utils.py", line 1747, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto because of the following error (look up to see its traceback):
'gbk' codec can't decode byte 0x81 in position 1069: illegal multibyte sequence`

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

1、conda create -n qwen2-vl python=3.10
2、conda activate qwen2-vl
3、pip install git+https://github.com/huggingface/transformers
4、执行python命令
5、from transformers import Qwen2VLForConditionalGeneration,AutoTokenizer, AutoProcessor

### Expected behavior

fix the bug

Comments:
Same here, it seems that the new import structure breaks the transformers on the Windows platform: https://github.com/huggingface/transformers/commit/f24f08432960023129817328cac6c01151d1f70f

https://github.com/hiyouga/LLaMA-Factory/actions/runs/10809410559/job/29987044325


Thanks for the report! This should have been fixed here: https://github.com/huggingface/transformers/pull/33436

Could you try updating `main` and letting me know whether this is fixed on your side?

It fixed the problem for me. Best experience ever, just logged in to see if there's the same issue I have, turns out the fix was submitted a minute ago. Tested it and it works!

oh wait a second, I just tested it from different environment, it still doesn't work for me

Hey @GregoryBolshakov, thanks for the report! Do you get the same error in that different environment? 

In that different environment, can you double check whether the latest `main` was fetched and the runtime restarted? Thank you :pray: 

It fixed our CI here: https://github.com/huggingface/trl/pull/2051

So any other issues that aren't in our CI definitely should be. Thanks for your help with the reports!

sorry for the second comment, it turned out the repository was not pulled on the second machine, I just updated, it works

Fixed here

Fantastic news! Leaving this issue open a bit more in case others come, will close if no new updates.

Thanks all!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.