Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

asyncio bug fix in telegram loader #928

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

diicellman
Copy link
Contributor

Description

I encountered this error while using the Telegram Loader in a FastAPI application: "RuntimeError: There is no current event loop in thread 'AnyIO worker thread'." I resolved it by replacing asyncio.get_event_loop() with asyncio.new_event_loop().

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • New Loader/Tool
  • Bug fix / Smaller change
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have added a library.json file if a new loader/tool was added
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@anoopshrma anoopshrma merged commit 4e1b743 into run-llama:main Feb 9, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants