RuntimeError: This event loop is already running is still an issue
See original GitHub issue~\anaconda3\lib\site-packages\TikTokApi\tiktok.py in _initialize(self, **kwargs)
161
162 if self._signer_url is None:
--> 163 self._browser = asyncio.get_event_loop().run_until_complete(
164 asyncio.gather(browser.create(**kwargs))
165 )[0]
This is where the issue happens.
Like others, I am just trying to get TiktokApi to initialize using with TikTokApi() as api:
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
RuntimeError: This event loop is already running in python
I got the issue resolved by using the nest_async pip install nest-asyncio. and adding below lines in my file.
Read more >How to get around “RuntimeError: This event loop is already ...
After a little more research I found that the ipython kernel itself runs on an event loop, and as of Tornado 5.0, it's...
Read more >This event loop is already running" When attempting REPL ...
I assume upgrading to 3.9 would improve this, still saw issues, and downgraded to 3.8.3 - still having issues with sync_playwright: import ...
Read more >Event Loop — Python 3.11.1 documentation
The event loop is the core of every asyncio application. Event loops run asynchronous tasks and callbacks, perform network IO operations, and run...
Read more >"event loop is already running" while trying to run `prodigy.serve`
I'm trying to use Prodigy via the Python API, but hitting an unexpected error. I'm just trying something basic, so let's say this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For jupyter, try adding
Thanks! Will give this a try next time I use it