GithubHelp home page GithubHelp logo

Comments (3)

tdryer avatar tdryer commented on June 27, 2024

Looks like http_utils.longpoll_fetch is yielding None instead of a future. I'm not sure why that's happening.

from hangups.

xmikos avatar xmikos commented on June 27, 2024

I have also many KeyError (and subsequently TypeError: 'NoneType' object is not iterable) errors in log (but Hangups seems to work anyway). Here is one example:

2014-08-19 10:58:49,115 - hangups.client - DEBUG - Received event: on_focus(UgxpcDaz1kIZ3y8gxHJ4AaABAQ, UserID(chat_id='112452697865679874139', gaia_id='112452697865679874139'), 2014-08-19 08:
58:48.973999+00:00, focused, mobile)
2014-08-19 10:58:49,115 - hangups.client - INFO - Triggered event Client.on_focus
2014-08-19 10:58:49,116 - tornado.application - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 175, in wrapper
    yielded = next(result)
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 571, in data_received
    yield gen.maybe_future(self._delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 520, in data_received
    self.request.streaming_callback(chunk)
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 91, in _streaming_callback
    streaming_callback(data)
  File "/home/storage/temp/hangups/hangups/channel.py", line 248, in _on_push_data
    self.on_message(msg_type, msg)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 512, in _on_push_data
    getattr(self, event_name)(*args)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 75, in _on_focus
    self.get(conv_id).on_focus(user_id, timestamp, status, device)
  File "/home/storage/temp/hangups/hangups/client.py", line 90, in get
    return self._conv_dict[conv_id]
KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ'
2014-08-19 10:58:49,164 - tornado.application - ERROR - Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f229bd641e0>, <tornado.concurrent.Future object at 0x7f229bdf89e8>)
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 175, in wrapper
    yielded = next(result)
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 571, in data_received
    yield gen.maybe_future(self._delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 520, in data_received
    self.request.streaming_callback(chunk)
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 91, in _streaming_callback
    streaming_callback(data)
  File "/home/storage/temp/hangups/hangups/channel.py", line 248, in _on_push_data
    self.on_message(msg_type, msg)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 512, in _on_push_data
    getattr(self, event_name)(*args)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 75, in _on_focus
    self.get(conv_id).on_focus(user_id, timestamp, status, device)
  File "/home/storage/temp/hangups/hangups/client.py", line 90, in get
    return self._conv_dict[conv_id]
KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 59, in fetch
    connect_timeout=connect_timeout, request_timeout=request_timeout
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 111, in result
    raise self._exception
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 384, in <lambda>
    lambda f: f.result())
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 207, in _read_message
    yield body_future
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 52, in __exit__
    raise _QuietException
tornado.http1connection._QuietException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/ioloop.py", line 565, in _run_callback
    ret = callback()
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 697, in <lambda>
    self.future, lambda f: self.run())
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 646, in run
    self.result_future.set_exc_info(sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 167, in set_exc_info
    self.set_exception(exc_info[1])
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 150, in set_exception
    self._set_done()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 177, in _set_done
    cb(self)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 31, in done_callback
    self.set_result(future)
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 145, in set_result
    self._set_done()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 175, in _set_done
    for cb in self._callbacks:
TypeError: 'NoneType' object is not iterable

from hangups.

tdryer avatar tdryer commented on June 27, 2024

KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ' sounds like a new conversation was created, which hangups can't handle yet. I don't understand how that causes the other exception though. Furthermore, hangouts is supposed to crash when there's an unhandled exception instead of logging it.

from hangups.

Related Issues (20)

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.