[BUG] - greenlet.error: cannot switch to a different thread
See original GitHub issueI tried to combine into django with this TikTokApi, before that there was no problem when I was using version 3.7.5 it worked smoothly.
However, after I upgraded the version this error occurred
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/rest_framework/decorators.py", line 50, in handler
return func(*args, **kwargs)
File "/home/handoko/DEV/EVELLO/evello-scrapper/tiktok/views.py", line 113, in by_trending
trending = api.trending(n_post)
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/TikTokApi/tiktok.py", line 256, in trending
res = self.getData(url=api_url, **kwargs)
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/TikTokApi/tiktok.py", line 136, in getData
verify_fp, did, signature = self.browser.sign_url(**kwargs)
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/TikTokApi/browser.py", line 162, in sign_url
page = self.create_page()
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/TikTokApi/browser.py", line 110, in create_page
context = self.browser.newContext(**iphone)
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/playwright/sync_api.py", line 6188, in newContext
self._sync(
File "/home/handoko/DEV/EVELLO/ven/lib/python3.8/site-packages/playwright/sync_base.py", line 105, in _sync
dispatcher_fiber_.switch()
greenlet.error: cannot switch to a different thread
I tried to return to the previous version too, but it still got an error. hoping for an answer
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[BUG] greenlet.error: cannot switch to a different thread #1422
Exception ignored in thread started by: <function do_work at 0x0000017D638D3700> Traceback (most recent call last): File "D:\test\main.py", ...
Read more >greenlet.error: cannot switch to a different thread
Something similar happened to me when I tried to debug a flask application using Pycharm. What I finally did to eventually solve my...
Read more >greenlet.error not raised switching between threads for main ...
Consider this code snippet. It starts a background thread and exposes an attribute that allows switching to the main greenlet of the ...
Read more >eventlet errors and cannot switch to a different thread
During the deletion of a volume eventlet can error being unable to switch threads. We also see that the volume fails to delete...
Read more >Greenlets and Python Threads - Read the Docs
It is not possible to mix or switch between greenlets belonging to different threads.
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
@davidteather not fixed yet
not working for me as well. any solution?