Giter Site home page Giter Site logo

django-test-streaming-response's People

Contributors

wowkin2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-test-streaming-response's Issues

RuntimeError: cannot schedule new futures after interpreter shutdown

Hi,

If you run a second instance of test_stream.py, you get the following error:

(redacted)\lib\site-packages\django\template\base.py:766: RuntimeWarning: coroutine 'AsyncToSync.main_wrap' was never awaited
  self.literal = float(var)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Internal Server Error: /sse_async
Traceback (most recent call last):
  File "(redacted)\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "(redacted)\lib\site-packages\django\core\handlers\base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "(redacted)\lib\site-packages\asgiref\sync.py", line 114, in __call__
    self._run_event_loop, loop, awaitable
  File "(redacted)\python37\lib\concurrent\futures\thread.py", line 165, in submit
    raise RuntimeError('cannot schedule new futures after '
RuntimeError: cannot schedule new futures after interpreter shutdown
2020-08-21 09:48:56,674 django.request  ERROR   Internal Server Error: /sse_async
Traceback (most recent call last):
  File "(redacted)\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "(redacted)\lib\site-packages\django\core\handlers\base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "(redacted)\lib\site-packages\asgiref\sync.py", line 114, in __call__
    self._run_event_loop, loop, awaitable
  File "(redacted)\python37\lib\concurrent\futures\thread.py", line 165, in submit
    raise RuntimeError('cannot schedule new futures after '
RuntimeError: cannot schedule new futures after interpreter shutdown

Tested with:

  • Windows 10
  • Python 3.7.7
  • Django 3.1
  • Daphne 2.5.0
  • nest-asyncio 1.4.0
  • requests 2.24.0

Best regards,
Benoit

Cannot stop Daphne process

Hi,

As soon as someone gets /sse_async, the Daphne process enters an infinite loop and cannot be stopped with Ctrl-C.

Tested with:

  • Windows 10
  • Python 3.7.7
  • Django 3.1
  • Daphne 2.5.0
  • nest-asyncio 1.4.0
  • requests 2.24.0

Best regards,
Benoit

test_stream.py doesn't receive anything

Hi,

When I follow the instructions on README, here is what happens:

$ python test_stream.py
2020-08-21 09:36:51,750 __main__        INFO    Started downloading content

On the server-side, however, I can see:

2020-08-21 09:36:53,777 INFO     Generated message for iteration: iteration 000000
2020-08-21 09:36:54,778 INFO     Generated message for iteration: iteration 000001

Tested with:

  • Windows 10
  • Python 3.7.7
  • Django 3.1
  • Daphne 2.5.0
  • nest-asyncio 1.4.0
  • requests 2.24.0

Best regards,
Benoit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.