Skip to content

circular import issue in streamed voice example #291

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

Closed
gaviral opened this issue Mar 21, 2025 · 1 comment
Closed

circular import issue in streamed voice example #291

gaviral opened this issue Mar 21, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@gaviral
Copy link
Contributor

gaviral commented Mar 21, 2025

Please read this first

  • Have you read the docs?Agents SDK docs
  • Have you searched for related issues? Others may have faced similar issues. ✅

Describe the bug

uv run examples/voice/streamed/main.py


Traceback (most recent call last):
  File "/Users/aviralgarg/code/openai-agents-python/examples/voice/streamed/main.py", line 14, in <module>
    from agents.voice import StreamedAudioInput, VoicePipeline
  File "/Users/aviralgarg/code/examples/voice/streamed/main.py", line 5, in <module>
    from agents import Agent, Runner, TResponseInputItem, function_tool
ImportError: cannot import name 'Agent' from partially initialized module 'agents' (most likely due to a circular import) (/Users/aviralgarg/code/examples/voice/streamed/agents.py)

circular import issue.

fix:

mv examples/voice/streamed/agents.py examples/voice/streamed/my_workflow.py

and replace from .agents import MyWorkflow with from my_workflow import MyWorkflow in examples/voice/streamed/main.py

Debug information

  • Agents SDK version: v0.0.6
  • Python version 3.11.11

Repro steps

uv run examples/voice/streamed/main.py

Expected behavior

voice streamed example should have run.

@gaviral gaviral added the bug Something isn't working label Mar 21, 2025
rm-openai added a commit that referenced this issue Mar 21, 2025
…291 (#292)

Fix circular dependency in voice streamed example by renaming agents.py
to my_workflow.py

Fix circular dependency in voice streamed example by renaming agents
#291
@rm-openai
Copy link
Collaborator

thanks for fixing.

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

2 participants