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

ValueError: too many values to unpack (expected 3) #22

Open
ampledata opened this issue Feb 2, 2023 · 5 comments
Open

ValueError: too many values to unpack (expected 3) #22

ampledata opened this issue Feb 2, 2023 · 5 comments

Comments

@ampledata
Copy link
Collaborator

ampledata commented Feb 2, 2023

pi@adsbexchange:~ $ adsbcot -c /etc/adsbcot.ini
2023-02-02 22:52:44,246 pytak INFO - CoT_URL Dest: udp://239.2.3.1:6969
2023-02-02 22:52:44,247 pytak INFO - CoT_URL Dest: udp://239.2.3.1:6969
2023-02-02 22:52:44,247 pytak INFO - Run: <class 'pytak.classes.CLITool'>
2023-02-02 22:52:44,249 pytak INFO - Run: <class 'pytak.classes.TXWorker'>
2023-02-02 22:52:44,250 pytak INFO - Running <class 'adsbcot.classes.ADSBNetReceiver'> for tcp+raw://localhost:30002
2023-02-02 22:52:44,252 pytak INFO - Running <class 'adsbcot.classes.ADSBNetWorker'> for data_type: raw
2023-02-02 22:52:44,252 pytak INFO - Run: <class 'pytak.classes.RXWorker'>
2023-02-02 22:52:46,481 pytak INFO - Complete: <Task finished name='Task-4' coro=<ADSBNetWorker.run() done, defined at /home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py:184> exception=ValueError('too many values to unpack (expected 3)')>
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-4' coro=<ADSBNetWorker.run() done, defined at /home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py:184> exception=ValueError('too many values to unpack (expected 3)')>
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py", line 241, in run
    decoder.process_raw(
  File "/home/pi/.local/lib/python3.9/site-packages/pyModeS/streamer/decode.py", line 158, in process_raw
    ac["HPL"], ac["RCu"], ac["RCv"] = pms.adsb.nuc_p(msg)
ValueError: too many values to unpack (expected 3)
pi@adsbexchange:~ $

pyModeS version: pymodes==2.15

rtl versions:

pi@adsbexchange:~ $ dpkg -l | grep -i sdr
ii  librtlsdr-dev:armhf                  0.6.0-3                          armhf        Software defined radio receiver for Realtek RTL2832U (development)
ii  librtlsdr0:armhf                     0.6.0-3                          armhf        Software defined radio receiver for Realtek RTL2832U (library)
ii  libsoapysdr0.7:armhf                 0.7.2-2                          armhf        software defined radio interface library
ii  rtl-sdr                              0.6.0-3                          armhf        Software defined radio receiver for Realtek RTL2832U (tools)
ii  soapysdr-module-rtlsdr:armhf         0.3.0-2                          armhf        RTL-SDR device support for SoapySDR (default version)
ii  soapysdr0.7-module-rtlsdr:armhf      0.3.0-2                          armhf        RTL-SDR device support for SoapySDR

@ampledata
Copy link
Collaborator Author

DEBUG:asyncio:Using selector: EpollSelector
INFO:asyncio:Datagram endpoint local_addr=('239.2.3.1', 6969) remote_addr=None created: (<_SelectorDatagramTransport fd=6 read=idle write=<idle, bufsize=0>>, <pytak.asyncio_dgram.aio.Protocol object at 0xb4365a18>)
DEBUG:asyncio:Datagram endpoint remote_addr=('239.2.3.1', 6969) created: (<_SelectorDatagramTransport fd=7 read=idle write=<idle, bufsize=0>>, <pytak.asyncio_dgram.aio.Protocol object at 0xb4365e38>)
2023-02-02 23:16:47,140 pytak DEBUG pytak.classes.add_task:261 - Add Task: <pytak.classes.TXWorker object at 0xb67b1c58>
2023-02-02 23:16:47,140 pytak DEBUG pytak.classes.add_task:261 - Add Task: <pytak.classes.RXWorker object at 0xb6768ce8>
2023-02-02 23:16:47,141 pytak INFO pytak.classes.__init__:200 - CoT_URL Dest: udp://239.2.3.1:6969
2023-02-02 23:16:47,141 pytak INFO pytak.classes.__init__:200 - CoT_URL Dest: udp://239.2.3.1:6969
2023-02-02 23:16:47,141 pytak DEBUG pytak.classes.add_task:261 - Add Task: <adsbcot.classes.ADSBNetReceiver object at 0xb4365e20>
2023-02-02 23:16:47,141 pytak DEBUG pytak.classes.add_task:261 - Add Task: <adsbcot.classes.ADSBNetWorker object at 0xb4365d60>
2023-02-02 23:16:47,142 pytak INFO pytak.classes.run:282 - Run: <class 'pytak.classes.CLITool'>
2023-02-02 23:16:47,143 pytak DEBUG pytak.classes.run_task:271 - Run Task: <adsbcot.classes.ADSBNetReceiver object at 0xb4365e20>
2023-02-02 23:16:47,144 pytak DEBUG pytak.classes.run_task:271 - Run Task: <adsbcot.classes.ADSBNetWorker object at 0xb4365d60>
2023-02-02 23:16:47,145 pytak DEBUG pytak.classes.run_task:271 - Run Task: <pytak.classes.TXWorker object at 0xb67b1c58>
2023-02-02 23:16:47,145 pytak DEBUG pytak.classes.run_task:271 - Run Task: <pytak.classes.RXWorker object at 0xb6768ce8>
2023-02-02 23:16:47,146 pytak INFO pytak.classes.run:277 - Running <class 'adsbcot.classes.ADSBNetReceiver'> for tcp+beast://localhost:30005
2023-02-02 23:16:47,146 pytak DEBUG pytak.classes.run:290 - host=localhost port=30005
DEBUG:asyncio:Get address info localhost:'30005', type=<SocketKind.SOCK_STREAM: 1>
2023-02-02 23:16:47,153 pytak INFO pytak.classes.run:188 - Running <class 'adsbcot.classes.ADSBNetWorker'> for data_type: beast
DEBUG:asyncio:Getting address info localhost:'30005', type=<SocketKind.SOCK_STREAM: 1> took 3.536ms: [(<[AddressFamily.AF](http://addressfamily.af/)_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 30005))]
2023-02-02 23:16:47,155 pytak INFO pytak.classes.run:90 - Run: <class 'pytak.classes.TXWorker'>
2023-02-02 23:16:47,155 pytak INFO pytak.classes.run:174 - Run: <class 'pytak.classes.RXWorker'>
DEBUG:asyncio:<asyncio.TransportSocket fd=8, family=[AddressFamily.AF](http://addressfamily.af/)_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 34960), raddr=('127.0.0.1', 30005)> connected to localhost:'30005': (<_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>, <asyncio.streams.StreamReaderProtocol object at 0xb4365f10>)
2023-02-02 23:16:47,171 pytak DEBUG pytak.classes.run:211 - Received 0 messages
2023-02-02 23:16:47,226 pytak DEBUG pytak.classes.run:211 - Received 1 messages
2023-02-02 23:16:47,256 pytak DEBUG pytak.classes.handle_data:131 - TX: b'<event version="2.0" type="t-x-d-d" uid="adsbcot@adsbexchange" how="m-g" time="2023-02-02T23:16:47.142332Z" start="2023-02-02T23:16:47.142387Z" stale="2023-02-03T00:16:47.142409Z" />'
2023-02-02 23:16:47,258 pytak DEBUG pytak.classes.run:180 - RX: b'<event version="2.0" type="t-x-d-d" uid="adsbcot@adsbexchange" how="m-g" time="2023-02-02T23:16:47.142332Z" start="2023-02-02T23:16:47.142387Z" stale="2023-02-03T00:16:47.142409Z" />'
2023-02-02 23:16:47,444 pytak DEBUG pytak.classes.run:211 - Received 2 messages
2023-02-02 23:16:47,445 pytak INFO pytak.classes.run:292 - Complete: <Task finished name='Task-3' coro=<ADSBNetWorker.run() done, defined at /home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py:184> exception=ValueError('too many values to unpack (expected 2)') created at /home/pi/.local/lib/python3.9/site-packages/pytak/classes.py:272>
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-3' coro=<ADSBNetWorker.run() done, defined at /home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py:184> exception=ValueError('too many values to unpack (expected 2)') created at /home/pi/.local/lib/python3.9/site-packages/pytak/classes.py:272>
source_traceback: Object created at (most recent call last):
  File "/home/pi/.local/bin/adsbcot", line 8, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.9/site-packages/adsbcot/commands.py", line 31, in main
    pytak.cli(__name__.split(".", maxsplit=1)[0])
  File "/home/pi/.local/lib/python3.9/site-packages/pytak/client_functions.py", line 395, in cli
    asyncio.run(main(app_name, config), debug=debug)
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1882, in _run_once
    handle._run()
  File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/pi/.local/lib/python3.9/site-packages/pytak/client_functions.py", line 294, in main
    await clitool.run()
  File "/home/pi/.local/lib/python3.9/site-packages/pytak/classes.py", line 285, in run
    self.run_tasks()
  File "/home/pi/.local/lib/python3.9/site-packages/pytak/classes.py", line 278, in run_tasks
    self.run_task(task)
  File "/home/pi/.local/lib/python3.9/site-packages/pytak/classes.py", line 272, in run_task
    self.running_tasks.add(asyncio.ensure_future(task.run()))
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.9/site-packages/adsbcot/classes.py", line 241, in run
    decoder.process_raw(
  File "/home/pi/.local/lib/python3.9/site-packages/pyModeS/streamer/decode.py", line 170, in process_raw
    ac["HVE"], ac["VVE"] = pms.adsb.nuc_v(msg)
ValueError: too many values to unpack (expected 2)
DEBUG:asyncio:Close <_UnixSelectorEventLoop running=False closed=False debug=True>
pi@adsbexchange:/etc $

@daskalovst
Copy link

If you try to run debug with config, you gonna receive different err. output
DEBUG=1 adsbcot -c /configpath/myconfig.ini


ERROR from adsbcot
Please reinstall adsbcot with pyModeS support:
$ python3 -m pip install adsbcot[with_pymodes]


i am not a programmer....
however i think is something related to pymodes 2.15, the pymodes cannot be installed correctly in my machine

it seams there have problem with pymodes and python version in my case
Python 2.7.18 or Python 3.8.10 i am not sure which one is used.

@ampledata
Copy link
Collaborator Author

@daskalovst The error you posted is unrelated. I've opened a new issue for you over at #23.

@DDBurner
Copy link

DDBurner commented Mar 3, 2023

Hi,

got the same issue: ValueError: too many values to unpack (expected 2)

Any idea to fix it?

ET.

@daskalovst
Copy link

this have to fix the issue: in the config file
DUMP1090_URL = http://172.17.2.122:8080/data/aircraft.json
POLL_INTERVAL = 10
it seams the PyModeS doesn't like the incoming data format from the dump1090, i also test with RAW and SBS1 both cause the same error.

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

3 participants