snstac/adsbxcot

cot_url not parsing correctly

B08Z opened this issue · 1 comments

B08Z commented

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.

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.