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

pyModeS and generic install issues #33

Open
tstechnologies opened this issue Aug 3, 2023 · 2 comments
Open

pyModeS and generic install issues #33

tstechnologies opened this issue Aug 3, 2023 · 2 comments

Comments

@tstechnologies
Copy link

tstechnologies commented Aug 3, 2023

Just wanted to post this but I think you are already aware;

for ubuntu users (20.04, 22.04) some additional packages need to be installed. I ran:

sudo apt install python3-pip -y
sudo python3 -m pip install --upgrade toml
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install pymodes>=2.8 (also tried with out the '>=2.8' but had mixed results saw that versions noted in the source code)

The default python version is 3.8

Also installed it from source via the latest in releases (zip file)

Functions otherwise via that method did not have much luck with installing via pip (with pyModeS)

When reading a feed from dump1090-fa get the error:

2023-08-03 00:17:38,647 pytak INFO - COT_URL: tcp://192.168.1.10:8093
2023-08-03 00:17:38,648 pytak INFO - COT_URL: tcp://192.168.1.10:8093
2023-08-03 00:17:38,648 pytak INFO - Using KNOWN_CRAFT: /home/admin/adsbcot/known_craft.csv
2023-08-03 00:17:38,648 pytak INFO - Run: <class 'pytak.classes.CLITool'>
2023-08-03 00:17:38,649 pytak INFO - Run: <class 'pytak.classes.TXWorker'>
2023-08-03 00:17:38,649 pytak INFO - Run: <class 'pytak.classes.RXWorker'>
2023-08-03 00:17:38,650 pytak INFO - Running <class 'adsbcot.classes.ADSBNetWorker'> for data_type: beast
2023-08-03 00:17:38,650 pytak INFO - Running <class 'adsbcot.classes.ADSBNetReceiver'> for tcp+beast://192.168.1.11:30005
2023-08-03 00:17:38,864 pytak INFO - Complete: <Task finished name='Task-4' coro=<ADSBNetWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/adsbcot-6.2.0b5-py3.8.egg/adsbcot/classes.py:248> exception=ValueError('too many values to unpack (expected 2)')>
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-4' coro=<ADSBNetWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/adsbcot-6.2.0b5-py3.8.egg/adsbcot/classes.py:248> exception=ValueError('too many values to unpack (expected 2)')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/adsbcot-6.2.0b5-py3.8.egg/adsbcot/classes.py", line 305, in run
    decoder.process_raw(
  File "/usr/local/lib/python3.8/dist-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)

Seems to be an issue with pyModeS reading beast or raw feeds. The source machine is the latest version of dump1090-fa. Reading beats via 30005 with VRS and TAR1090.

JSON is not suitable in my application as it does not provide close to realtime data.

Test pyModeS it with:

modeslive --source net --connect 192.168.1.11 30005 beast

output shows no aircraft

any thoughts or pointers are appreciated! Can post more detail if needed.

@ampledata
Copy link
Collaborator

ampledata commented Aug 3, 2023 via email

@tstechnologies
Copy link
Author

tstechnologies commented Aug 11, 2023

Gave this a shot both on the beast output port and the raw output port and got some mixed results.

On the beast output '30005' using the tcp+raw flag the script will run but it doesn't process any data

On dump1090-fa's defined raw output port 30002 I get this error:

........(left out to obfuscate IPS in use).......
2023-08-11 02:00:00,665 pytak INFO - Running <class 'adsbcot.classes.ADSBNetWorker'> for data_type: raw
2023-08-11 02:00:01,213 pytak INFO - Complete: <Task finished name='Task-5' coro=<ADSBNetWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/adsbcot/classes.py:248> exception=AttributeError("'NoneType' object has no attribute 'replace'")>
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-5' coro=<ADSBNetWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/adsbcot/classes.py:248> exception=AttributeError("'NoneType' object has no attribute 'replace'")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/adsbcot/classes.py", line 319, in run
    "flight": val.get("call", key).replace("_", ""),
AttributeError: 'NoneType' object has no attribute 'replace'

Took your advice on the usage of the JSON method and seems to work decently now that I commented out the poll interval. Ill stick with that for now. I see it updating about every 3 seconds now by default.

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