Repository: tdryer/hangups

Issue #297: build_user_conversation_list IndexError when conversation has no events
Created: 2017-01-24T14:09:20Z
I get the following error on startup since upgrading to python 3.6. Installed via yaourt on Arch.
$ hangups
...
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 568, in __del__
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1290, in call_exception_handler
  File "/usr/lib/python3.6/logging/__init__.py", line 1330, in error
  File "/usr/lib/python3.6/logging/__init__.py", line 1437, in _log
  File "/usr/lib/python3.6/logging/__init__.py", line 1447, in handle
  File "/usr/lib/python3.6/logging/__init__.py", line 1509, in callHandlers
  File "/usr/lib/python3.6/logging/__init__.py", line 858, in handle
  File "/usr/lib/python3.6/logging/__init__.py", line 1064, in emit
  File "/usr/lib/python3.6/logging/__init__.py", line 1054, in _open
NameError: name 'open' is not defined
Exception ignored in: <bound method BaseConnector.__del__ of <aiohttp.connector.TCPConnector object at 0x7fc21910bc88>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/connector.py", line 170, in __del__
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1290, in call_exception_handler
  File "/usr/lib/python3.6/logging/__init__.py", line 1330, in error
  File "/usr/lib/python3.6/logging/__init__.py", line 1437, in _log
  File "/usr/lib/python3.6/logging/__init__.py", line 1447, in handle
  File "/usr/lib/python3.6/logging/__init__.py", line 1509, in callHandlers
  File "/usr/lib/python3.6/logging/__init__.py", line 858, in handle
  File "/usr/lib/python3.6/logging/__init__.py", line 1064, in emit
  File "/usr/lib/python3.6/logging/__init__.py", line 1054, in _open
NameError: name 'open' is not defined

Duplicate issue #303: IndexError on examples/build_conversation_list.py
Created: 2017-02-03T21:50:59Z
when I run
PYTHONPATH=. python3 examples/build_conversation_list.py
it prompts for my username and password, then throws an IndexError

Traceback (most recent call last):
File "examples/build_conversation_list.py", line 32, in 
run_example(sync_recent_conversations)
File "/hangups/examples/common.py", line 31, in run_example
loop.run_until_complete(task)
File "/usr/lib/python3.5/asyncio/base_events.py", line 457, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 292, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/hangups/examples/common.py", line 76, in _async_main
yield from example_coroutine(client, args)
File "examples/build_conversation_list.py", line 13, in sync_recent_conversations
yield from hangups.build_user_conversation_list(client)
File "/hangups/hangups/conversation.py", line 58, in build_user_conversation_list
conv_event = conv_state.event[0]
File "/hangups/env/lib/python3.5/site-packages/protobuf-3.1.0.post1-py3.5.egg/google/protobuf/internal/containers.py", line 204, in getitem
return self._values[key]
IndexError: list index out of range

Where /hangups/env/ is my python3.5 virtual environment on ubuntu 16.10
Adding try / except around line 57 in conversation.py gives the result of 1 known user and 0 known conversation.

Closing comment (2017-02-16T04:04:14Z): Duplicate of #297.