Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Problem with `timed_window` with asyncio

Aberta
#131 3 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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'

Linguagem predominante
Python
Estrelas
1.3k
Forks
151
Merge médio
17h 39min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de python-streamz/streamz

Todas as issues de python-streamz/streamz

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.