generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Describe the bug
Error trying to run agentcore create
To Reproduce
Steps to reproduce the behavior:
Run agentcore create with the below arguments and see the errors below:
----------------------------------------------------------------------------------------------------
🤖 AgentCore activated. Let's build your agent.
----------------------------------------------------------------------------------------------------
Where should we create your new agent?
./AgentCore
How would you like to start?
A basic starter project (recommended)
What agent framework should we use?
Strands Agents SDK
Which model provider will power your agent?
Amazon Bedrock
What kind of memory should your agent have?
Long-term and short-term memory
Initialize a new git repository?
No
Agent initializing...
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\cli\create\commands.py:154 in create │
│ │
│ 151 │ │ if not non_interactive_flag: │
│ 152 │ │ │ git_init = prompt_git_init() == "Yes" │
│ 153 │ │ intro_animate_once() │
│ ❱ 154 │ │ generate_project( │
│ 155 │ │ │ name=project_name, │
│ 156 │ │ │ sdk_provider=sdk, │
│ 157 │ │ │ model_provider=model_provider, │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ agent_config = None │ │
│ │ basic_opt_text = 'A basic starter project (recommended)' │ │
│ │ ctx = <click.core.Context object at 0x0000023CF9EB47D0> │ │
│ │ git_init = False │ │
│ │ iac = None │ │
│ │ is_basic = True │ │
│ │ memory = 'STM_AND_LTM' │ │
│ │ model_provider = 'Bedrock' │ │
│ │ non_interactive_flag = False │ │
│ │ project_name = 'AgentCore' │ │
│ │ provider_api_key = None │ │
│ │ sdk = 'Strands' │ │
│ │ template = 'basic' │ │
│ │ user_provided_args = False │ │
│ │ venv_option = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\generate.py:95 in generate_project │
│ │
│ 92 │ │ ctx.memory_is_long_term = memory == MemoryConfig.STM_AND_LTM │
│ 93 │ │
│ 94 │ with sink.step("Template copying", "Template copied"): │
│ ❱ 95 │ │ _apply_baseline_and_sdk_features(ctx) │
│ 96 │ │ │
│ 97 │ │ if not ctx.iac_provider: │
│ 98 │ │ │ write_minimal_create_runtime_yaml(ctx, memory) │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ agent_config = None │ │
│ │ api_key_name = None │ │
│ │ ctx = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ deployment_type = 'direct_code_deploy' │ │
│ │ git_init = False │ │
│ │ iac_provider = None │ │
│ │ memory = 'STM_AND_LTM' │ │
│ │ model_provider = 'Bedrock' │ │
│ │ name = 'AgentCore' │ │
│ │ output_path = WindowsPath('C:/Users/JMatson/source/repos/AgentCore') │ │
│ │ provider_api_key = None │ │
│ │ sdk_provider = 'Strands' │ │
│ │ sink = <bedrock_agentcore_starter_toolkit.create.progress.progress_sink.ProgressSink object at │ │
│ │ 0x0000023CF9EE6900> │ │
│ │ src_path = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src') │ │
│ │ template_dir = 'runtime_only' │ │
│ │ use_venv = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\generate.py:143 in │
│ _apply_baseline_and_sdk_features │
│ │
│ 140 │ │
│ 141 │ # Apply SDK feature (renders SDK-specific templates) │
│ 142 │ if sdk_feature: │
│ ❱ 143 │ │ sdk_feature.apply(ctx) │
│ 144 │
│ 145 │
│ 146 def _apply_iac_generation(ctx: ProjectContext, agent_config: BedrockAgentCoreAgentSchema │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ baseline_feature = <bedrock_agentcore_starter_toolkit.create.baseline_feature.BaselineFeature object at │ │
│ │ 0x0000023CF9EE74D0> │ │
│ │ ctx = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ deps = { │ │
│ │ │ 'strands-agents-tools >= 0.2.16', │ │
│ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ 'pytest >= 7.0.0', │ │
│ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ 'mcp >= 1.19.0' │ │
│ │ } │ │
│ │ sdk_feature = <bedrock_agentcore_starter_toolkit.create.features.strands.feature.StrandsFeature object at │ │
│ │ 0x0000023CF9EE7620> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\features\base_feature.py:56 in apply │
│ │
│ 53 │ │ """Prepare and apply the feature, automatically rendering common templates if en │
│ 54 │ │ self.before_apply(context) │
│ 55 │ │ self._resolve_template_dir(context) │
│ ❱ 56 │ │ self.execute(context) │
│ 57 │ │ self.after_apply(context) │
│ 58 │ │
│ 59 │ @abstractmethod │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ context = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ self = <bedrock_agentcore_starter_toolkit.create.features.strands.feature.StrandsFeature object at │ │
│ │ 0x0000023CF9EE7620> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\features\strands\feature.py:33 in execute │
│ │
│ 30 │ │
│ 31 │ def execute(self, context: ProjectContext): │
│ 32 │ │ """Call render_dir.""" │
│ ❱ 33 │ │ self.render_dir(context.src_dir, context) │
│ 34 │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ context = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ self = <bedrock_agentcore_starter_toolkit.create.features.strands.feature.StrandsFeature object at │ │
│ │ 0x0000023CF9EE7620> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\features\base_feature.py:77 in render_dir │
│ │
│ 74 │ │ # e.g., strands/templates/runtime_only/common/ │
│ 75 │ │ local_common_dir = self.template_dir / TemplateDirSelection.COMMON │
│ 76 │ │ if local_common_dir.exists(): │
│ ❱ 77 │ │ │ self._render_from_template_src_dir(local_common_dir, dest_dir, context) │
│ 78 │ │ else: │
│ 79 │ │ │ # If no common directory, render the template_dir directly │
│ 80 │ │ │ self._render_from_template_src_dir(self.template_dir, dest_dir, context) │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ context = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ dest_dir = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src') │ │
│ │ global_common_dir = WindowsPath('C:/Python313/Lib/site-packages/bedrock_agentcore_starter_toolkit/create/featur… │ │
│ │ local_common_dir = WindowsPath('C:/Python313/Lib/site-packages/bedrock_agentcore_starter_toolkit/create/featur… │ │
│ │ self = <bedrock_agentcore_starter_toolkit.create.features.strands.feature.StrandsFeature object at │ │
│ │ 0x0000023CF9EE7620> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\site-packages\bedrock_agentcore_starter_toolkit\create\features\base_feature.py:104 in │
│ _render_from_template_src_dir │
│ │
│ 101 │ │ │ rendered_content = template.render(context.dict()) │
│ 102 │ │ │ # Only write the file if it has content (skip empty files) │
│ 103 │ │ │ if rendered_content.strip(): │
│ ❱ 104 │ │ │ │ dest.write_text(rendered_content) │
│ 105 │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ context = ProjectContext( │ │
│ │ │ name='AgentCore', │ │
│ │ │ output_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore'), │ │
│ │ │ src_dir=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src'), │ │
│ │ │ entrypoint_path=WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py'), │ │
│ │ │ sdk_provider='Strands', │ │
│ │ │ iac_provider=None, │ │
│ │ │ model_provider='Bedrock', │ │
│ │ │ template_dir_selection='runtime_only', │ │
│ │ │ runtime_protocol='HTTP', │ │
│ │ │ deployment_type='direct_code_deploy', │ │
│ │ │ python_dependencies=[ │ │
│ │ │ │ 'aws-opentelemetry-distro >= 0.10.0', │ │
│ │ │ │ 'bedrock-agentcore >= 1.0.3', │ │
│ │ │ │ 'mcp >= 1.19.0', │ │
│ │ │ │ 'pytest >= 7.0.0', │ │
│ │ │ │ 'pytest-asyncio >= 0.21.0', │ │
│ │ │ │ 'python-dotenv >= 1.2.1', │ │
│ │ │ │ 'strands-agents >= 1.13.0', │ │
│ │ │ │ 'strands-agents-tools >= 0.2.16' │ │
│ │ │ ], │ │
│ │ │ iac_dir=None, │ │
│ │ │ agent_name='AgentCore_Agent', │ │
│ │ │ memory_enabled=True, │ │
│ │ │ memory_name='AgentCore_Memory', │ │
│ │ │ memory_event_expiry_days=30, │ │
│ │ │ memory_is_long_term=True, │ │
│ │ │ custom_authorizer_enabled=False, │ │
│ │ │ custom_authorizer_url=None, │ │
│ │ │ custom_authorizer_allowed_clients=None, │ │
│ │ │ custom_authorizer_allowed_audience=None, │ │
│ │ │ vpc_enabled=False, │ │
│ │ │ vpc_subnets=None, │ │
│ │ │ vpc_security_groups=None, │ │
│ │ │ request_header_allowlist=None, │ │
│ │ │ observability_enabled=True, │ │
│ │ │ api_key_env_var_name=None │ │
│ │ ) │ │
│ │ dest = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py') │ │
│ │ dest_dir = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src') │ │
│ │ env = <jinja2.environment.Environment object at 0x0000023CFA031950> │ │
│ │ rel = WindowsPath('main.py.j2') │ │
│ │ rendered_content = 'import os\nfrom strands import Agent, tool\nfrom strands_tools.code_interpreter im'+3528 │ │
│ │ self = <bedrock_agentcore_starter_toolkit.create.features.strands.feature.StrandsFeature object at │ │
│ │ 0x0000023CF9EE7620> │ │
│ │ src = WindowsPath('C:/Python313/Lib/site-packages/bedrock_agentcore_starter_toolkit/create/feature… │ │
│ │ template = <Template 'main.py.j2'> │ │
│ │ template_src_dir = WindowsPath('C:/Python313/Lib/site-packages/bedrock_agentcore_starter_toolkit/create/feature… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\pathlib\_local.py:555 in write_text │
│ │
│ 552 │ │ # Call io.text_encoding() here to ensure any warning is raised at an │
│ 553 │ │ # appropriate stack level. │
│ 554 │ │ encoding = io.text_encoding(encoding) │
│ ❱ 555 │ │ return PathBase.write_text(self, data, encoding, errors, newline) │
│ 556 │ │
│ 557 │ _remove_leading_dot = operator.itemgetter(slice(2, None)) │
│ 558 │ _remove_trailing_slash = operator.itemgetter(slice(-1)) │
│ │
│ ╭─────────────────────────────────────────────── locals ───────────────────────────────────────────────╮ │
│ │ data = 'import os\nfrom strands import Agent, tool\nfrom strands_tools.code_interpreter im'+3528 │ │
│ │ encoding = 'locale' │ │
│ │ errors = None │ │
│ │ newline = None │ │
│ │ self = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py') │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\pathlib\_abc.py:652 in write_text │
│ │
│ 649 │ │ │ raise TypeError('data must be str, not %s' % │
│ 650 │ │ │ │ │ │ │ data.__class__.__name__) │
│ 651 │ │ with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f │
│ ❱ 652 │ │ │ return f.write(data) │
│ 653 │ │
│ 654 │ def iterdir(self): │
│ 655 │ │ """Yield path objects of the directory contents. │
│ │
│ ╭───────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ data = 'import os\nfrom strands import Agent, tool\nfrom strands_tools.code_interpreter im'+3528 │ │
│ │ encoding = 'locale' │ │
│ │ errors = None │ │
│ │ f = <_io.TextIOWrapper name='C:\\Users\\JMatson\\source\\repos\\AgentCore\\src\\main.py' mode='w' │ │
│ │ encoding='cp1252'> │ │
│ │ newline = None │ │
│ │ self = WindowsPath('C:/Users/JMatson/source/repos/AgentCore/src/main.py') │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Python313\Lib\encodings\cp1252.py:19 in encode │
│ │
│ 16 │
│ 17 class IncrementalEncoder(codecs.IncrementalEncoder): │
│ 18 │ def encode(self, input, final=False): │
│ ❱ 19 │ │ return codecs.charmap_encode(input,self.errors,encoding_table)[0] │
│ 20 │
│ 21 class IncrementalDecoder(codecs.IncrementalDecoder): │
│ 22 │ def decode(self, input, final=False): │
│ │
│ ╭────────────────────────────────────────────── locals ───────────────────────────────────────────────╮ │
│ │ final = False │ │
│ │ input = 'import os\r\nfrom strands import Agent, tool\r\nfrom strands_tools.code_interpreter '+3632 │ │
│ │ self = <encodings.cp1252.IncrementalEncoder object at 0x0000023CF9E5F020> │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f4ca' in position 3612: character maps to <undefined>
Expected behavior
Completed agentcore create without errors.
Desktop (please complete the following information):
- Windows 11 Enterprise
Device name API443953250671
Processor 12th Gen Intel(R) Core(TM) i7-1265U (2.70 GHz)
Installed RAM 32.0 GB (31.8 GB usable)
Device ID F38F9757-CBBF-4DD5-B847-FF3E19B5F94A
Product ID 00330-80000-00000-AA235
System type 64-bit operating system, x64-based processor
Pen and touch Pen and touch support with 10 touch points
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels