Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

'charmap' codec can't encode character '\U0001f680' in position 4: character maps to <undefined>

未关闭
#2,010 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, python
领域
backend, cli

调研方向

使用文档中记录的 AgentCore CLI 命令重现 Windows 故障,并检查第 945 行附近 _sync_stream_with_error_handling 中的 MyAgent/.venv/Lib/site-packages/bedrock_agentcore/runtime/app.py。跟踪流式响应文本的写入或编码方式,然后验证 getting-started 演示在 Windows 上处理 🚀 字符时不会出现 Unicode 错误。

由索引模型根据 Issue 内容生成。

描述

bug
Description

Running the bare AgentCore getting-started demo produces a Unicode error:

'charmap' codec can't encode character '\U0001f680' in position 4: character maps to

Steps to Reproduce

Exactly following Get started with the AgentCore CLI:

  1. npm install -g @aws/agentcore
  2. agentcore create --name MyAgent --framework Strands --protocol HTTP --model-provider Bedrock --memory none
  3. In MyAgent/model/load.py, change the model:

    return BedrockModel(model_id="global.amazon.nova-2-lite-v1:0")

  4. cd MyAgent
  5. agentcore dev
  6. Enter a question; e.g. "What are the highlights of the uv package manager for Python?"
Expected Behavior

The model returns a response with no error.

Actual Behavior

The uv package manager for Python is an extremely fast, all-in-one tool that simplifies Python development by replacing multiple tools with a single, high-performance solution. Here are the key highlights of uv:

🚀 **Error: 'charmap' codec can't encode character '\U0001f680' in position 4: character maps to <undefined>
CLI Version

0.27.0

Operating System

Windows

Additional Context

Initial searches indicated this is related to Python. In any case, in an enterprise framework the first-steps demo should run without issue, across platforms.

From experience, I would guess that one or more layer is making assumptions about the system charset rather than being explicit about which charset is needed.

…

Looking at the console stack trace, the error seems to originate in: MyAgent\\app\\MyAgent\\.venv\\Lib\\site-packages\\bedrock_agentcore\\runtime\\app.py:_sync_stream_with_error_handling:945

主要语言
TypeScript
星标
291
派生
96
平均合并
17 小时 29 分钟
30 天内合并 PR
193

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/agentcore-cli 的其他 Issue

查看 aws/agentcore-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。