[BUG] RuntimeError: Loop is not running

Open
#781 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, python
Domain
backend, cloud

Research direction

Start by inspecting s3fs/core.py around line 546 and reproducing startup in the reported Sanic environment with fsspec and s3fs 2023.9.0. Compare behavior with version 2023.6.0, focusing on the unawaited ClientCreatorContext.aexit warning and subsequent loop error. Done means startup no longer emits the warning or raises RuntimeError: Loop is not running.

Written by the indexing model from the issue text.

Description

Versions:

fsspec                        2023.9.0
s3fs                          2023.9.0

On my Sanic app startup, I'm getting the following warning message:

/opt/python/lib/python3.10/site-packages/s3fs/core.py:546: RuntimeWarning: coroutine 'ClientCreatorContext.__aexit__' was never awaited
  loop.create_task(s3.__aexit__(None, None, None))

Which I think is then what is leading to this exception later on:

RuntimeError: Loop is not running

The RuntimeError did not appear previously on version 2023.6.0.

However, the error only seems to occur on app startup. The app seems to still work fine afterwards.

Dominant language
Python
Stars
1k
Forks
305
Avg merge
22h 37m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fsspec/s3fs

All issues in fsspec/s3fs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.