python-txws code is not compatible with Python 3.9 More specifically the tostring() method was removed (which was an alias to the tobytes()). While the package compiles successfully, code that uses it fail with a traceback. A minimal fix is required to fix that: diff --git a/txws.py b/txws.py index 7de92a4..b81a274 100644 --- a/txws.py +++ b/txws.py @@ -214,7 +214,7 @@ def mask(buf, key): buf = array.array("B", buf) for i in range(len(buf)): buf[i] ^= key[i % 4] - return buf.tostring() + return buf.tobytes() def make_hybi07_frame(buf, opcode=0x1): """
https://src.fedoraproject.org/rpms/python-txws/pull-request/3