Problem communicating with UART1 with Python on Beaglebone Black
Your error message is a pure python programming problem, which means the question doesn't really belong on EESE but rather Stackoverflow, however for sake of efficiency an answer here will migrate with the question.
ser.write((&quot;Hello&quot;).encode)

This is invalid python.  There is no such thing as .encode rather you need the method .encode() if you want the default encoding, or to pass a specific encoding as an argument if you want some other.
ser.write((&quot;Hello&quot;).encode()) #UTF-8 which is probably not what you want

or mabye
ser.write((&quot;Hello&quot;).encode('iso-8859-1')) #a legacy friendly encoding

Also you probably don't want to both import the Adafruit UART code and use pyserial on the Linux device.  For a given UART, you'll need to be consistent in how you work with it.