UnicodeDecodeError: 'gbk' codec can't decode byte 0x81 in position 5795: illegal multibyte sequence
passerby-bye opened this issue · comments
Traceback (most recent call last):
File "E:\00soup_iface\main.py", line 1, in <module>
import modelscope_studio
File "C:\Users\Administrator\modelscope-studio\backend\modelscope_studio\__init__.py", line 5, in <module>
from .components.WaterfallGallery import \
File "C:\Users\Administrator\modelscope-studio\backend\modelscope_studio\components\WaterfallGallery\__init__.py", line 38, in <module>
class ModelScopeWaterfallGallery(Component):
File "E:\Anaconda\envs\agentscope\lib\site-packages\gradio\component_meta.py", line 198, in __new__
create_or_modify_pyi(component_class, name, events)
File "E:\Anaconda\envs\agentscope\lib\site-packages\gradio\component_meta.py", line 92, in create_or_modify_pyi
source_code = source_file.read_text()
File "E:\Anaconda\envs\agentscope\lib\pathlib.py", line 1136, in read_text
return f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x81 in position 5795: illegal multibyte sequence
System Information
OS: Windows
Python version:3.10
modelscope_studio:0.1.4
gradio:4.21.0
A probably Slove method
The default encoding mode of the Windows system is 'gbk', and you need to specify the decoding mode as 'utf-8'.
gradio->component_meta.py->line 92
source_code = source_file.read_text(encoding='utf-8')
Thank you for bringing this to our attention, but it seems that the error is not directly caused bymodelscope_studio
.
We've Integrated some tools fromgradio
to create custom components, and it seems the issue lies within these. It would be better to report this issue in thegradio
repo and we'll follow up on it.
+1
Thank you for bringing this to our attention, but it seems that the error is not directly caused bymodelscope_studio
.
We've Integrated some tools fromgradio
to create custom components, and it seems the issue lies within these. It would be better to report this issue in thegradio
repo and we'll follow up on it.
We found the reason and have fixed it in modelscope_studio@0.1.5
. Thanks again!