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

aprs messages with unicode in them triggers crash #78

Open
ryancnelson opened this issue Feb 21, 2021 · 0 comments
Open

aprs messages with unicode in them triggers crash #78

ryancnelson opened this issue Feb 21, 2021 · 0 comments
Labels

Comments

@ryancnelson
Copy link

Describe the bug
aprs messages with unicode in them triggers crash

To Reproduce
Steps to reproduce the behavior:

  1. run ./main.py
  2. wait until some funnyman messages "🤪" over packet

see this python trace dump:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/home/chip/pypacket/pypacket/base/receiver.py", line 136, in __decoder_worker
    self.__process_decoded_packet(cleaned_packet)
  File "/home/chip/pypacket/pypacket/base/receiver.py", line 102, in __process_decoded_packet
    processor.handle(decoded_packet)
  File "/home/chip/pypacket/pypacket/implementations/cli_processor.py", line 32, in handle
    self.log_handler.log_packet(packet, print_friendly_packet)
  File "/home/chip/pypacket/pypacket/util/logger.py", line 58, in log_packet
    self.__log_any(Colors.RESET, '', friendly_message)
  File "/home/chip/pypacket/pypacket/util/logger.py", line 69, in __log_any
    print(color + prefix + Colors.RESET + log_message)
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f92a' in position 444: ordinal not in range(128)


Expected behavior
one more log line.

Screenshots
see pasted python trace

System info (please complete the following information):

  • OS: [pocketchip running debian-ish ~2016]
  • Python Version 3.9 built from source
  • PyPacket Version: HEAD from feb 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant