When using 5.0.0 version with Django 5.0.2 I am getting this error:
Internal Server Error: /api/stream/cdss/notifications/counter/
Traceback (most recent call last):
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/asgiref/sync.py", line 534, in thread_handler
raise exc_info[1]
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/django/core/handlers/exception.py", line 42, in inner
response = await get_response(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/asgiref/sync.py", line 534, in thread_handler
raise exc_info[1]
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
response = await wrapped_callback(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/asgiref/sync.py", line 479, in __call__
ret: _R = await loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/asgiref/sync.py", line 538, in thread_handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/joaosaramago/PycharmProjects/platform/venv311/lib/python3.11/site-packages/django_eventstream/views.py", line 265, in events
if not response and request.grip.proxied:
^^^^^^^^^^^^
AttributeError: 'ASGIRequest' object has no attribute 'grip'
HTTP GET /api/stream/cdss/notifications/counter/ 500 [0.15, 127.0.0.1:64100]
I believe this is an issue in the line django_eventstream/views.py:265 should be:
if not response and hasattr(request, 'grip') and request.grip.proxied:
If I am mistaken what could be the problem happening here? I migrated the code from the previous version and removed channels library as it is no longer needed.
When using 5.0.0 version with Django 5.0.2 I am getting this error:
I believe this is an issue in the line
django_eventstream/views.py:265
should be:If I am mistaken what could be the problem happening here? I migrated the code from the previous version and removed channels library as it is no longer needed.