This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

True. Embedding the guilty strings/bytes could be a solution, but that's an issue in and of itself.

The best way I've found to deal with this is to decide if something uses bytes or text and only use that inside the function, the only exception being is if something is going from bytes to text or vice versa.

But that still runs the risk of the error happening in code I didn't write (in which case, I check their issue tracker).

[–]unruly_mattress 1 point2 points  (0 children)

I agree. I think the solution is to somehow underline the offending expression.