RobCranfill / 8x8-text-display

Python code to display text on an Adafruit 8x8 dot matrix display. Again.
GNU General Public License v3.0
0 stars 0 forks source link

Handle un-supported input characters #2

Open RobCranfill opened 4 years ago

RobCranfill commented 4 years ago
Message server listening on port 3141; delay 0.05
Recieved new message from 127.0.0.1: b'Spank me, Daddy!    _'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 56838)
Traceback (most recent call last):
  File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File "displayServer.py", line 48, in handle
    vrasters = makeVRasters(message)
  File "displayServer.py", line 72, in makeVRasters
    bl = byteListForChar(char)
  File "displayServer.py", line 58, in byteListForChar
    bits = font.FontData[char]
KeyError: ','
RobCranfill commented 4 years ago

This was really caused by the comma char being missing from the font code. Now that that's fixed, I don't know that this should happen again. Fix anyway.