PaddleHub icon indicating copy to clipboard operation
PaddleHub copied to clipboard

UnicodeDecodeError

Open notjiangjiu opened this issue 1 year ago • 1 comments

  • 版本、环境信息 1)PaddleHub和PaddlePaddle版本:paddlepaddle 2.4.0;paddlehub 2.1.1 2)系统环境:win10,python 3.9,使用disco_diffusion_cnclip_vitb16模型

错误: Traceback (most recent call last): File "d:\files\python_learn_aliyun\paddlehub2\test.py", line 13, in da = module.generate_image(text_prompts="girl", artist='a', File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\paddlehub\compat\paddle_utils.py", line 220, in runner return func(*args, **kwargs) File "C:\Users\manager.paddlehub\modules\disco_diffusion_cnclip_vitb16\module.py", line 137, in generate_image return create(text_prompts=text_prompts, File "C:\Users\manager.paddlehub\modules\disco_diffusion_cnclip_vitb16\reverse_diffusion_init_.py", line 127, in create from .config import load_config File "C:\Users\manager.paddlehub\modules\disco_diffusion_cnclip_vitb16\reverse_diffusion\config.py", line 16, in default_args = yaml.load(ymlfile, Loader=Loader) File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\yaml_init_.py", line 79, in load loader = Loader(stream) File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\yaml\loader.py", line 44, in init Reader.init(self, stream) File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\yaml\reader.py", line 85, in init self.determine_encoding() File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\yaml\reader.py", line 124, in determine_encoding self.update_raw() File "D:\files\python_learn_aliyun\paddlehub2\paddlehub_py_3.9\lib\site-packages\yaml\reader.py", line 178, in update_raw data = self.stream.read(size) UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 70: illegal multibyte sequence

notjiangjiu avatar Aug 07 '23 03:08 notjiangjiu

这个是编码问题,请使用utf-8编码试试

w5688414 avatar Mar 20 '24 06:03 w5688414