Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: expected a readable buffer object #3

Open
colegleason opened this issue Apr 9, 2014 · 3 comments
Open

TypeError: expected a readable buffer object #3

colegleason opened this issue Apr 9, 2014 · 3 comments

Comments

@colegleason
Copy link

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

@bwhite
Copy link
Member

bwhite commented Apr 9, 2014

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 [email protected]:

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
.

@colegleason
Copy link
Author

Ah. I'm an idiot. Thanks for pointing that out.
On Apr 9, 2014 6:23 AM, "Brandyn White" [email protected] 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 <[email protected]

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
.

@bwhite
Copy link
Member

bwhite commented Apr 9, 2014

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 [email protected]:

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

On Apr 9, 2014 6:23 AM, "Brandyn White" [email protected] 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 <[email protected]

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants