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

msg_received - ValueError: too many values to unpack (expected 2) #101

Open
stuaxo opened this issue Feb 23, 2017 · 0 comments
Open

msg_received - ValueError: too many values to unpack (expected 2) #101

stuaxo opened this issue Feb 23, 2017 · 0 comments

Comments

@stuaxo
Copy link

stuaxo commented Feb 23, 2017

I'm getting an issue where msg_received gets a list of length 4 and it expects one of length 2.

I'm not currently exactly whats happening - put ipdb into msg_recieved to have a look at the data coming in:

CRITICAL:aiozmq.rpc:Cannot unpack [b'\x939\xd0\x08\x01\x00\x00\x00G\xdc:j\xbc+\xd6A', b'connect_client', b'\x91\xb2aaaaaaaaaaaaaa4000', b'\x80']
Traceback (most recent call last):
  File "/home/pi/.virtualenvs/lumen_client/lib/python3.5/site-packages/aiozmq/rpc/rpc.py", line 134, in msg_received
    header, banswer = data
ValueError: too many values to unpack (expected 2)
> /home/pi/.virtualenvs/lumen_client/lib/python3.5/site-packages/aiozmq/rpc/rpc.py(140)msg_received()
    138             logger.critical("Cannot unpack %r", data, exc_info=sys.exc_info())
    139             import ipdb; ipdb.set_trace()
--> 140             return
    141         call = self.calls.pop(req_id, None)
    142         if call is None:

ipdb> w
  /home/pi/.virtualenvs/lumen_client/bin/lumenclient(11)<module>()
      8 if __name__ == '__main__':
      9     sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
     10     sys.exit(
---> 11         load_entry_point('lumenclient==0.4.6', 'console_scripts', 'lumenclient')()
     12     )

  /home/pi/lumen-client/lumen_client/lumenclient.py(2486)main()
   2484     try:
   2485         ln = LumenClient(restart_player=RESTART_PLAYER, headless=args.headless or args.diagnose, player_layer=args.player_layer)
-> 2486         ln.serve()
   2487     except KeyboardInterrupt:
   2488         print("\nSee you next time %s." % os.environ.get('USER').capitalize())

  /home/pi/lumen-client/lumen_client/lumenclient.py(2323)serve()
   2321         tasks = self.client_tasks()
   2322         try:
-> 2323             loop.run_until_complete(tasks)
   2324         except asyncio.CancelledError:
   2325             pass

  /home/pi/.virtualenvs/lumen_client/lib/python3.5/site-packages/aiozmq/core.py(687)_read_ready()
    685         try_again = False
    686         if not self._paused and events & zmq.POLLIN:
--> 687             self._do_read()
    688             try_again = True
    689         if self._buffer and events & zmq.POLLOUT:

  /home/pi/.virtualenvs/lumen_client/lib/python3.5/site-packages/aiozmq/core.py(716)_do_read()
    714             self._fatal_error(exc, 'Fatal read error on zmq socket transport')
    715         else:
--> 716             self._protocol.msg_received(data)
    717 
    718     def _do_write(self):

> /home/pi/.virtualenvs/lumen_client/lib/python3.5/site-packages/aiozmq/rpc/rpc.py(140)msg_received()
    138             logger.critical("Cannot unpack %r", data, exc_info=sys.exc_info())
    139             import ipdb; ipdb.set_trace()
--> 140             return
    141         call = self.calls.pop(req_id, None)
    142         if call is None:
ipdb> data
[b'\x939\xd0\x08\x01\x00\x00\x00G\xdc:j\xbc+\xd6A', b'connect_client', b'\x91\xb2aaaaaaaaaaaaaa4000', b'\x80']
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

1 participant