Problem with autoconversion to character

You already do have the number 12, or a list with the single element of a number 12. You’re being confused by how it displays in the debugger.

That error indicates that you’re sending a list of a single integer to byte_size, which expects a binary.

But the beginning of you message indicates that you should have a number, not a list. So we need to see more of your code for context about what you’re actually trying to do with your data…