Skip to content

'ascii' codec can't encode character '”' in position 0: ordinal not in range(128) #446

@baqwas

Description

@baqwas

Newbie issue!

After launching the app via:
$ PYTHONUTF8=1 adk web --port 8000
navigating to the browser and entering any text in the Message box on the right pane results in the following response:

 'ascii' codec can't encode character '”' in position 0: ordinal not in range(128)

Tried several basic attempts at resolution, but all failed:

  • script declaration:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
  • environment variable declaration:
PYTHONUTF8=1 adk web --port 8000
  • EXPORT statements:
export PYTHONUTF8=1

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Nothing works, the error message persists. Locale is correctly set to "en_US.UTF-8" as confirmed by locale command output.

Any suggestions? Thanks.

Regards.

P.S.

$ uname -a
Linux BeUlta 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr  6 15:05:05 UTC 2025 x86_64 GNU/Linux
$ python --version
Python 3.13.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions