homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
300 stars 28 forks source link

Fix 160 #163

Closed sheagcraig closed 3 years ago

sheagcraig commented 3 years ago

I took a look.

Sorry for the delay friend ;)

So, try firing up python3 and doing

from Foundation import NSString
NSString("All good ๐ŸŒฎ")
NSString("Uh oh ๐Ÿ’ฉ".encode())
NSString(b"Definitely not")

So I removed the part where the send notification func is encoding messages prior to being stuffed into a notification and voila! Recipe Robot is happy again.

sheagcraig commented 3 years ago

Apparently I totally jacked the PR... I know you've got A+ git skills that eclipse mine, so please cherry pick or whatever magic incantation it requires ;)

homebysix commented 3 years ago

Holy moly โ€”ย all that searching down rabbit holes, and it was down to a two-line fix. You're a legend! ๐Ÿ†

sheagcraig commented 3 years ago

After thinking about this for awhile, I was wondering... Maybe you should capture exceptions and throw the tracebacks into this NSNotification system for the app to show. I think that's what made this so difficult to troubleshoot for you. When it failed in the app, it never displayed the actual errors you were getting. But if you could have a top-level exception handler that pops the traceback into the NSNotification thingy, you'd be able to at least see it in the app log.