Page 1 of 1

Problem with Phidgets Bridge and socket.io

Posted: Sun Dec 04, 2016 11:08 pm
by fjblau
I am trying to send data to socket.io server with the Phidget Python libraries.

I keep getting this message:

Code: Select all

An incompatible websocket library is conflicting with the one we need.
You can remove the incompatible library and install the correct one
by running the following commands:

yes | pip uninstall websocket websocket-client
pip install -U websocket-client


But this does not fix the problem.

Re: Problem with Phidgets Bridge and socket.io

Posted: Mon Dec 05, 2016 10:16 pm
by fjblau
Fixed with this small change to transport.py

Code: Select all

from socket import error as SocketError
try:
    from websocket import (
        SSLError, WebSocketConnectionClosedException,
        WebSocketTimeoutException, create_connection)
except ImportError:
    exit("""\
An incompatible websocket library is conflicting with the one we need.
You can remove the incompatible library and install the correct one
by running the following commands:
yes | pip uninstall websocket websocket-client
pip install -U websocket-client""")