Closed randolph-gravely closed 1 year ago
Do you know which team’s news feed lead to the headline appearing?
I'm finding a play button ▶️ emoji starting to appear for "game story" articles. Just checked the astros feed
I'm also seeing the play buttons on the cubs feed though. I'm testing the feed on my board now and haven't experienced a crash yet
The code that crashed is only in the emulator, not the actual board (I wrote it, I’m pretty sure) so I think it would need to be a different error
Not seeing a crash on board. Just saw the Game Story article and it ended with a play icon and then a ? symbol (like it didn't understand the character)
Can you give the emulator version? It's possible this is an issue with RGBME and not this project.
Tyler Porter
On Thu, Apr 20, 2023, 7:41 PM swemoney @.***> wrote:
I'm finding a play button ▶️ emoji starting to appear for "game story" articles. Just checked the astros feed
— Reply to this email directly, view it on GitHub https://github.com/MLB-LED-Scoreboard/mlb-led-scoreboard/issues/463#issuecomment-1517063465, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEAM5K5EX2Z7Z6W2MMQHSTXCHCR7ANCNFSM6AAAAAAXGEVKHA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>
@ty-porter how do I find the emulator version?
I am pretty new to programming, so I am not sure if this is the best way to fix the issue, but I did resolve it by removing emojis from headlines.
I did so by adding the following to the scrollingtext.py in the renderers folder:
from cleantext import clean
And then at line 28:
clean_text = clean(text,normalize_whitespace=False, no_emoji=True, lower=False)
@WardBrian it was the Braves headlines that were causing the issue. It was the same thing that @swemoney described with the Astro's: it had the play emoji ("▶️ ") present in several article headlines
@ty-porter how do I find the emulator version?
python3 -m pip show RGBMatrixEmulator
I can reproduce this in emulator v0.8.3
Steps to trigger the bug:
For this specific trigger that would mean the string needs an emoji as the first character of a string that's large enough to scroll. The error will happen when the scrolling goes offscreen
I will fix this upstream in RGBME, however the fix there will be to gracefully handle 0 width characters. Missing characters will still show a (?)
icon. If that's something we want to fix as well, we would need work in this project.
Resolved in #465.
This issue is a
Hardware Configuration
Software Configuration v6.3.0
Expected behavior
Ticker should rotate properly to the next screen
Actual behavior
If emoji is present in an MLB Article, it appears it causes the script to crash (at least in emulation mode). The following error occurs: Emulator/graphics/init.py", line 19, in DrawText adjustment = abs(x + first_char_width) // first_char_width ZeroDivisionError: integer division or modulo by zero
Additional Information
Please note that this issue has ONLY been tested in emulation mode! I do not have a Raspberry Pi yet to test on a physical setup. It appears the best solution would be to automatically remove emojis from MLB News Headline Names.