Skip to content

Error while parsing PHGR #83

Description

@mprilepok

I got error during parsing PHG parameter with letter on the end of the value

APRS Packet: b'PA0AGO-11>APRS,TCPIP*,qAC,FOURTH:@072239z5150.54N/00441.71E#PHG1230I/A=000012 RX ONLY! RAZ IGATE'
Traceback (most recent call last):
File "/home/pi/test.py", line 61, in
AIS.consumer(on_message)
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/inet.py", line 185, in consumer
callback(self._parse(line))
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/parsing/init.py", line 134, in parse
_try_toparse_body(packet_type, body, parsed)
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/parsing/init.py", line 209, in _try_toparse_body
body, result = parse_position(packet_type, body)
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/parsing/position.py", line 76, in parse_position
parse_comment(body, parsed)
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/parsing/common.py", line 118, in parse_comment
body, result = parse_data_extentions(body)
File "/home/pi/.local/lib/python3.9/site-packages/aprslib/parsing/common.py", line 196, in parse_data_extentions
parsed.update({'phg_rate': int(phgr[0], 16)}) # as decimal
ValueError: invalid literal for int() with base 16: 'I'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions