Problem with Phidgets Bridge and socket.io

Supporting 2.6 and up
Post Reply
fjblau
Fresh meat
Posts: 2
Joined: Sun Dec 04, 2016 10:33 pm
Contact:

Problem with Phidgets Bridge and socket.io

Post 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.
fjblau
Fresh meat
Posts: 2
Joined: Sun Dec 04, 2016 10:33 pm
Contact:

Re: Problem with Phidgets Bridge and socket.io

Post 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""")
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests