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: invalid literal for int() with base 16: '0x' #2

Closed
ampledata opened this issue May 3, 2021 · 1 comment
Closed

ValueError: invalid literal for int() with base 16: '0x' #2

ampledata opened this issue May 3, 2021 · 1 comment

Comments

@ampledata
Copy link
Collaborator

ampledata commented May 3, 2021

exception=ValueError("invalid literal for int() with base 16: '0x'")>
Traceback (most recent call last):
  File "/home/gba/.local/lib/python3.7/site-packages/stratuxcot/classes.py", line 64, in run
    await self.handle_message(j_event)
  File "/home/gba/.local/lib/python3.7/site-packages/stratuxcot/classes.py", line 40, in handle_message
    classifier=self.cot_classifier
  File "/home/gba/.local/lib/python3.7/site-packages/stratuxcot/functions.py", line 142, in stratux_to_cot
    cot_type = classifier(icao_hex, emitter_category, flight)
  File "/home/gba/.local/lib/python3.7/site-packages/pytak/functions.py", line 192, in faa_to_cot_type
    icao_int = int(f"0x{icao_hex.replace('~', '')}", 16)
ValueError: invalid literal for int() with base 16: '0x'
@ampledata
Copy link
Collaborator Author

Fixed by adding a conditional to check for int or str.

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

1 participant