Exception: Attempted to call a sync iterator on an async stream. #157

Closed
opened 2026-02-15 16:28:22 -05:00 by yindo · 2 comments
Owner

Originally created by @nlp4everyone on GitHub (Nov 4, 2024).

When i try to stream tokens from Async Client, sometimes this exception happens:
exception
This is my code, from example of Official Ollama Github:
code
Anybody encountered this issue before?

Originally created by @nlp4everyone on GitHub (Nov 4, 2024). When i try to stream tokens from Async Client, sometimes this exception happens: ![exception](https://github.com/user-attachments/assets/f0c8a322-7c21-4a38-bed3-33c6f65a9813) This is my code, from example of Official Ollama Github: ![code](https://github.com/user-attachments/assets/cab6ec12-6e73-4f1f-9939-d0e6d5979803) Anybody encountered this issue before?
yindo closed this issue 2026-02-15 16:28:22 -05:00
Author
Owner

@xcq2000 commented on GitHub (Nov 5, 2024):

try close the VPN

@xcq2000 commented on GitHub (Nov 5, 2024): try close the VPN
Author
Owner

@ParthSareen commented on GitHub (Dec 23, 2024):

Closing this out - let me know if you're still running into this :) @nlp4everyone

@ParthSareen commented on GitHub (Dec 23, 2024): Closing this out - let me know if you're still running into this :) @nlp4everyone
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#157