snstac / adsbxcot

Display Aircraft in TAK
https://adsbxcot.rtfd.io
Apache License 2.0
51 stars 14 forks source link

cot_url not parsing correctly #1

Closed B08Z closed 3 years ago

B08Z commented 3 years ago

Fresh install with pip3 after a working install of adsbcot.

Comamnd: adsbxcot -A https://adsbexchange.com/api/aircraft/v2/lat/xx.xxxxx/lon/xx.xxxxx/dist/100/ -X XXXXX-XXX-XXX-XXXXXX -I 20 -U 192.168.1.XXX:8087

Output: File "/home/tak/.local/lib/python3.8/site-packages/pytak/functions.py", line 84, in protocol_factory return reader, writer UnboundLocalError: local variable 'reader' referenced before assignment

It seams that protocol_factory is not entering any of the IF / elif statments and returing reader which has not been assigned.

ampledata commented 3 years ago

Please specify a protocol in the CoT URL, for example: tcp:xxx or udp:xxx

I realize there should be error handling for that, will add in next version.