Socket send must be binary in Jython 2.7.3 (Ignition 8.1.35 and after)

I am prepping to upgrade a couple of systems from 8.1.19 to 8.1.37. Printing to Zebra printers has been giving me fits, getting an error message like:

TypeError: cannot make memory view because object does not have the buffer interface

I have a few places where I was writing strings to a socket and it accepted them before in 2.7.2 version Jython, but in 2.7.3 it gives the above error.

I sprinkle a few .encode("utf-8") s in to make it work.

So probably 2.7.3 is more strict about taking only binary. I don't think this is a bug, just wanted to put it on here to save the next person some time, cause it took a little while for me to hunt that down.

Here is more of the error:

"C:\Users\kmaze.ignition\cache\gwusatizwkit3001.na.bpww.org_8080\C0\pylib_socket.py", line 1461, in meth
return getattr(self._sock,name)(*args)
File "C:\Users\kmaze.ignition\cache\gwusatizwkit3001.na.bpww.org_8080\C0\pylib_socket.py", line 0, in sendall
TypeError: cannot make memory view because object does not have the buffer interface

Thanks

Or, better, just don't use jython's sockets. Python 2.7's poor separation between strings and byte arrays, which jython has to work around, makes a mess of socket interfaces. Just learn to use use the java.net and/or java.nio. Really.