niwinz / django-sse

HTML5 Server-Sent Events integration for Django
BSD 3-Clause "New" or "Revised" License
232 stars 36 forks source link

redisqueue error #20

Closed aztrock closed 10 years ago

aztrock commented 10 years ago

In redis

PUBLISH sse '1'
[15/Mar/2014 19:16:49] "GET /events2/ HTTP/1.1" 200 0
Traceback (most recent call last):
  File "/usr/lib/python3.3/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.3/wsgiref/handlers.py", line 179, in finish_response
    for data in self.result:
  File "/opt/repositories/billing/local/lib/python3.3/site-packages/django/http/response.py", line 295, in __next__
    return self.make_bytes(next(self._iterator))
  File "../django_sse/views.py", line 26, in _iterator
    for subiterator in self.iterator():
  File "../django_sse/redisqueue.py", line 69, in iterator
    event, data = json.loads(message['data'].decode('utf-8'))
TypeError: 'int' object is not iterable
[15/Mar/2014 19:16:49] "GET /events2/ HTTP/1.1" 500 59

and

PUBLISH sse 'hola'
Traceback (most recent call last):
  File "/usr/lib/python3.3/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.3/wsgiref/handlers.py", line 179, in finish_response
    for data in self.result:
  File "/opt/repositories/billing/local/lib/python3.3/site-packages/django/http/response.py", line 295, in __next__
    return self.make_bytes(next(self._iterator))
  File "../django_sse/views.py", line 26, in _iterator
    for subiterator in self.iterator():
  File "../django_sse/redisqueue.py", line 69, in iterator
    event, data = json.loads(message['data'].decode('utf-8'))
  File "/usr/lib/python3.3/json/__init__.py", line 316, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.3/json/decoder.py", line 351, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.3/json/decoder.py", line 369, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
niwinz commented 10 years ago

This project is unmaintained. Sorry for inconvenience.