MultiValue Tools

 View Only

 uopy 1.4.0, Python 3.12 -> socket error on Mac OS X (Apple Silicon)

C Walters's profile image
C Walters posted 05-08-2025 16:45

When attempting to use uopy 1.4.0 with Python 3.12 on Mac OS X Sequoia 15.4.1  (Apple Silicon) I get the following exception when trying to connect to a Universe server:

  File "*redacted*/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 159, in __init__
    self._socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 1)
                                                ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'socket' has no attribute 'TCP_KEEPIDLE'. Did you mean: 'TCP_KEEPALIVE'?


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
    session.connect()
  File "*redacted*/.venv/lib/python3.12/site-packages/uopy/_session.py", line 268, in connect
    self._rpc_connection.connect()
  File "*redacted*/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 105, in connect
    self.rpc_socket = _UniRPCSocket(self.host, self.port, self.timeout)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "*redacted*/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 170, in __init__
    raise UOError(ErrorCodes.UOE_RPC_FAILED) from e
uopy._uoerror.UOError: Error [81009] : The RPC failed


Commenting out the offending line 159 in _unirpc.py allows my connection to proceed.  Is this normal/expected behavior of uopy on Mac OS X?