-
[python] gradio -> UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 2072: illegal multibyte sequence 에러 해결 방법공부 이야기/그냥 찾아보는 공부 2024. 3. 27. 17:17
gradio를 사용하려니깐 시작부터 발목을 잡았다.
https://github.com/gradio-app/gradio/issues/6364
Encoding issues in newer Gradio versions · Issue #6364 · gradio-app/gradio
Describe the bug In 3.33.1, my gradio app could be launched perfectly fine on both Windows and Linux. However, when I upgraded to the most recent version, I was getting encoding issues left and rig...
github.com
-> 구글링을 해보니 라이브러리 소스에 들어가서 직접 read() -> read(encoding="utf-8")로 수정했다고 한다.
나도 소스 하나 하나 따라가면서 수정했다. 으이후
귀찮아서 다 캡쳐하진 못했지만 총 4군데를 수정했다.
.venv\Lib\site-packages\gradio\component_meta.py", line 92, in create_or_modify_pyi
source_code = source_file.read_text().venv\Lib\site-packages\gradio\component_meta.py", line 117, in create_or_modify_pyi
current_interface, _ = extract_class_source_code(pyi_file.read_text(), class_name).venv\Lib\site-packages\gradio\component_meta.py", line 123, in create_or_modify_pyi
contents = pyi_file.read_text().venv\Lib\site-packages\gradio\component_meta.py", line 125, in create_or_modify_pyi
current_contents = pyi_file.read_text()정리해보니. component_meta.py 이 파일 하나에서만 4군데를 고침
결과?
성공!
'공부 이야기 > 그냥 찾아보는 공부' 카테고리의 다른 글
ubuntu 명령어 모음 (0) 2024.04.26 [python] 날짜 포맷 이모저모 (0) 2024.03.28 Webhook이란? (0) 2024.03.25 Data Pipeline orchestator Apache AirFlow (0) 2024.02.13 소수의 성질 1 - 메르센 소수 (0) 2022.02.25