Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Problem with `timed_window` with asyncio

Offen
#131 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python

Rechercherichtung

Start with the fib_asyncio.py example and the sync function in streamz/core.py around line 1068, then reproduce the timed_window failure with asyncio. Trace how the event loop is checked and verify that the example runs without the reported AttributeError.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi,

When I try to use the timed_window function with the asyncio event loop I get the following error:

AttributeError: 'AsyncIOMainLoop' object has no attribute '_running'

For example if you change line 12 of the `fib_asyncio.py" example to:

s.timed_window(1.0).sink(lambda x: print(x))

then I get:

$ python fib_asyncio.py
Traceback (most recent call last):
  File "fib_asyncio.py", line 14, in <module>
    source.emit(0)                          # seed with initial values
  File "/opt/venv-numismatic/lib/python3.6/site-packages/streamz/core.py", line 219, in emit
    return sync(self.loop, _)
  File "/opt/venv-numismatic/lib/python3.6/site-packages/streamz/core.py", line 1068, in sync
    if not loop._running:
AttributeError: 'AsyncIOMainLoop' object has no attribute '_running'

Vorherrschende Sprache
Python
Sterne
1.3k
Forks
150
Ø Merge
17 Std. 39 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-streamz/streamz

Alle Issues in python-streamz/streamz

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.