home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 1237542803

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1802#issuecomment-1237542803 https://api.github.com/repos/simonw/datasette/issues/1802 1237542803 IC_kwDOBm6k_c5Jw2eT 9599 2022-09-06T00:23:27Z 2022-09-06T00:23:27Z OWNER Trying this fix: ```diff diff --git a/datasette/app.py b/datasette/app.py index f2a6763a5..b17888a07 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -231,7 +231,13 @@ def __init__( self.inspect_data = inspect_data self.immutables = set(immutables or []) self.databases = collections.OrderedDict() - self._refresh_schemas_lock = asyncio.Lock() + try: + self._refresh_schemas_lock = asyncio.Lock() + except RuntimeError as rex: + if "There is no current event loop in thread" in str(rex): + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + self._refresh_schemas_lock = asyncio.Lock() self.crossdb = crossdb self.nolock = nolock if memory or crossdb or not self.files: ``` This is mainly superstition at this point! I found that recipe on https://techoverflow.net/2020/10/01/how-to-fix-python-asyncio-runtimeerror-there-is-no-current-event-loop-in-thread/ {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1362402998  
Powered by Datasette · Queries took 0.879ms