Skip to content

Python: Unclosed client session error for the Azure AI streaming example #1825

@fmonbillard

Description

@fmonbillard

Using this streaming example with Azure AI, I run into this error:

Writer: Here are some slogan options:

- Electrify your adventures—without shocking your wallet.
- Big‑SUV fun, small price tag.
- Plug into joy, not a big bill.
- Charge less. Smile more.
- Thrill-sized SUV, budget‑friendly price.
- Electric joy, everyday affordable.
- Go electric. Spend less. Smile more.
- Your fun‑first, budget‑smart electric SUV.
Reviewer: Feedback:

- Strengths: Clear focus on affordability + fun; upbeat tone; easy to remember.
- Issues: Several lines feel cliché (“Smile more,” “shocking your wallet”); some are long; limited SUV-specific cues (space, capability); “Charge less” may imply cost claims.
- Suggestions: Aim for 3–5 words; add SUV capability cues (adventure, room, torque); avoid negative money framing (“bill,” “wallet”); pick 1–2 distinct tonal directions (playful vs. confident).

Tightened edits:
- Big SUV energy, small price.
- Electric SUV fun, minus the spend.
- Instant torque, family budget.[2025-10-30 22:41:26 - /opt/homebrew/Cellar/python@3.13/3.13.9_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py:1879 - ERROR] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1095a0440>
[2025-10-30 22:41:26 - /opt/homebrew/Cellar/python@3.13/3.13.9_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py:1879 - ERROR] Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x109547470>, 144717.058886)])']
connector: <aiohttp.connector.TCPConnector object at 0x1095a02f0>

I don't see the "===== Final output =====" marker so I suspect something happened before the end of the agent processing

Metadata

Metadata

Assignees

Labels

pythonworkflowsRelated to Workflows in agent-framework

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions