Skip to content

TypeError: expected a readable buffer object #3

Open

Description

@colegleason

When running a script, I sometimes get the following error

Entering handler_loop
Traceback (most recent call last):
  File "subtitles.py", line 51, in <module>
    wearscript.parse(callback, argparse.ArgumentParser())
  File "/Users/cole/code/subs/venv/src/wearscript/wearscript/__init__.py", line 14, in parse
    args.func_(callback, **vargs)
  File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 222, in websocket_client_factory
    callback(WebSocketClientConnection(websocket.create_connection(client_endpoint)), **kw)
  File "subtitles.py", line 50, in callback
    ws.handler_loop()
  File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 100, in handler_loop
    d = self.receive()
  File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 202, in receive
    return msgpack.loads(self.ws.recv())
  File "_unpacker.pyx", line 105, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:105)
TypeError: expected a readable buffer object

Is this related to changes in the wire format?

Relevant code here: https://gist.github.com/colegleason/9401095

Activity

  1. bwhite commented on Apr 9, 2014

    @bwhite
    Member

    I've only seen this before when someone has pressed the QR button and made
    a new code for Glass than the one used in the python client.

    On Wed, Apr 9, 2014 at 1:09 AM, Cole Gleason notifications@github.comwrote:

    When running a script, I sometimes get the following error

    Entering handler_loop
    Traceback (most recent call last):
    File "subtitles.py", line 51, in
    wearscript.parse(callback, argparse.ArgumentParser())
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/init.py", line 14, in parse
    args.func_(callback, *_vargs)
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 222, in websocket_client_factory
    callback(WebSocketClientConnection(websocket.create_connection(client_endpoint)), *_kw)
    File "subtitles.py", line 50, in callback
    ws.handler_loop()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 100, in handler_loop
    d = self.receive()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py", line 202, in receive
    return msgpack.loads(self.ws.recv())
    File "_unpacker.pyx", line 105, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:105)
    TypeError: expected a readable buffer object

    Is this related to changes in the wire format?

    Relevant code here: https://gist.github.com/colegleason/9401095

    Reply to this email directly or view it on GitHubhttps://github.com//issues/3
    .

  2. colegleason commented on Apr 9, 2014

    @colegleason
    Author

    Ah. I'm an idiot. Thanks for pointing that out.
    On Apr 9, 2014 6:23 AM, "Brandyn White" notifications@github.com wrote:

    I've only seen this before when someone has pressed the QR button and made
    a new code for Glass than the one used in the python client.

    On Wed, Apr 9, 2014 at 1:09 AM, Cole Gleason <notifications@github.com

    wrote:

    When running a script, I sometimes get the following error

    Entering handler_loop
    Traceback (most recent call last):
    File "subtitles.py", line 51, in
    wearscript.parse(callback, argparse.ArgumentParser())
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/init.py",
    line 14, in parse
    args.func_(callback, **vargs)
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 222, in websocket_client_factory

    callback(WebSocketClientConnection(websocket.create_connection(client_endpoint)),
    **kw)
    File "subtitles.py", line 50, in callback
    ws.handler_loop()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 100, in handler_loop
    d = self.receive()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 202, in receive
    return msgpack.loads(self.ws.recv())
    File "_unpacker.pyx", line 105, in msgpack._unpacker.unpackb
    (msgpack/_unpacker.cpp:105)
    TypeError: expected a readable buffer object

    Is this related to changes in the wire format?

    Relevant code here: https://gist.github.com/colegleason/9401095

    Reply to this email directly or view it on GitHub<
    https://github.com/wearscript/wearscript-python/issues/3>
    .

    Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-39953003
    .

  3. bwhite commented on Apr 9, 2014

    @bwhite
    Member

    Nah it's a known "badness" that should have a more reasonable error message
    than "crash".

    On Wed, Apr 9, 2014 at 3:54 PM, Cole Gleason notifications@github.comwrote:

    Ah. I'm an idiot. Thanks for pointing that out.

    On Apr 9, 2014 6:23 AM, "Brandyn White" notifications@github.com wrote:

    I've only seen this before when someone has pressed the QR button and
    made
    a new code for Glass than the one used in the python client.

    On Wed, Apr 9, 2014 at 1:09 AM, Cole Gleason <notifications@github.com

    wrote:

    When running a script, I sometimes get the following error

    Entering handler_loop
    Traceback (most recent call last):
    File "subtitles.py", line 51, in
    wearscript.parse(callback, argparse.ArgumentParser())
    File
    "/Users/cole/code/subs/venv/src/wearscript/wearscript/init.py",
    line 14, in parse
    args.func_(callback, **vargs)
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 222, in websocket_client_factory

    callback(WebSocketClientConnection(websocket.create_connection(client_endpoint)),
    **kw)

    File "subtitles.py", line 50, in callback
    ws.handler_loop()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 100, in handler_loop
    d = self.receive()
    File "/Users/cole/code/subs/venv/src/wearscript/wearscript/socket.py",
    line 202, in receive
    return msgpack.loads(self.ws.recv())
    File "_unpacker.pyx", line 105, in msgpack._unpacker.unpackb
    (msgpack/_unpacker.cpp:105)
    TypeError: expected a readable buffer object

    Is this related to changes in the wire format?

    Relevant code here: https://gist.github.com/colegleason/9401095

    Reply to this email directly or view it on GitHub<
    https://github.com/wearscript/wearscript-python/issues/3>
    .

    Reply to this email directly or view it on GitHub<
    #3 (comment)

    .

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-40009014
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions