KPatr1ck / paddlehub-wechaty-demo

34 stars 7 forks source link

导入模块报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 109051644: invalid continuation byte #4

Open fdsuf opened 3 years ago

fdsuf commented 3 years ago

model = hub.Module(name='plato-mini')

[2021-08-17 11:30:13,858] [ INFO] - Already cached C:\Users\Administrator.paddlenlp\models\plato-mini\plato-mini.pdparams Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Miniconda3\envs\paddle_mini\lib\site-packages\paddlehub\module\module.py", line 388, in new module = cls.init_with_name( File "C:\ProgramData\Miniconda3\envs\paddle_mini\lib\site-packages\paddlehub\module\module.py", line 511, in init_with_name return user_module_cls(kwargs) File "C:\Users\Administrator.paddlehub\modules\plato_mini\module.py", line 41, in init self.model = UnifiedTransformerLMHeadModel.from_pretrained('plato-mini') File "C:\ProgramData\Miniconda3\envs\paddle_mini\lib\site-packages\paddlenlp\transformers\model_utils.py", line 297, in from_pretrained state_dict = paddle.load(weight_path) File "C:\ProgramData\Miniconda3\envs\paddle_mini\lib\site-packages\paddle\framework\io.py", line 364, in load load_result = pickle.load(f) if six.PY2 else pickle.load( UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 109051644: invalid continuation byte**

安装的版本: paddle2onnx 0.7 paddlehub 2.1.0 paddlenlp 2.0.2 paddlepaddle 2.0.2

fdsuf commented 3 years ago

anybody help?

KPatr1ck commented 3 years ago

load_result = pickle.load(f) if six.PY2 else pickle.load( UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 109051644: invalid continuation byte

你好,请问下目前用的是哪个python的版本?2.x还是3.x? 看着像是编码问题?

fdsuf commented 3 years ago

是3.x