I have this python file that sends a websocket message to my python server. But it keeps getting errors, I saw these errors before, but I canβt fix them, my python version is python2.7
#!/usr/bin/python import websocket import sys val = sys.argv[1] ws = websocket.create_connection("ws://ipaddress:9001") ws.send(val) ws.close()
Error
Traceback (most recent call last): File "./test.py", line 5, in <module> ws = websocket.create_connection("ws://ipaddress:9001") AttributeError: 'module' object has no attribute 'create_connection'
source share