Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] UnicodeDecodeError when running Docker container with Gradio component #503

Open
Lee-Ju-Yeong opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Lee-Ju-Yeong
Copy link

Description

Description

When running the Docker container, a UTF-8 decoding error occurs in the Python code, specifically when handling Gradio component files.

Environment

  • Python 3.10
  • Gradio library
  • Docker container environment

Reproduction steps

### Steps to Reproduce
1. Build the Docker image
2. Run the container
3. Error occurs during the initialization of Gradio components

Screenshots

![DESCRIPTION](LINK.png)

Logs

Traceback (most recent call last):
File "/app/app.py", line 33, in <module>
from ktem.main import App  # noqa
File "/app/libs/ktem/ktem/main.py", line 4, in <module>
from ktem.pages.chat import ChatPage
File "/app/libs/ktem/ktem/pages/chat/init.py", line 11, in <module>
from ktem.index.file.ui import File
File "/app/libs/ktem/ktem/index/file/ui.py", line 26, in <module>
class File(gr.File):
File "/usr/local/lib/python3.10/site-packages/gradio/component_meta.py", line 202, in new
create_or_modify_pyi(component_class, name, events)
File "/usr/local/lib/python3.10/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)
File "/usr/local/lib/python3.10/pathlib.py", line 1135, in read_text
return f.read()
File "/usr/local/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 1704: invalid start byte

Browsers

Chrome

OS

Windows

Additional information

No response

@Lee-Ju-Yeong Lee-Ju-Yeong added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant