title: AttributeError: 'module' object has no attribute 'WebSocketApp'
body: <p>I'm trying to connect to an API with python, using WebSocketApp, and I cannot seem to do it. No matter what I try, I keep getting this error:</p>
  
  <p><strong>AttributeError: 'module' object has no attribute 'WebSocketApp'</strong></p>
  
  <p>Here is the simple code I am using</p>
  
  <pre><code>import websocket
  import json
  
  def on_open(ws):
      json_data = json.dumps({'data':'value'})
      ws.send(json_data)
  
  def on_message(ws, message):
      print('data update: %s' % message)
  
  if __name__ == "__main__":
      apiUrl = "appurl"
      ws = websocket.WebSocketApp(apiUrl, on_message = on_message, on_open = on_open)
      ws.run_forever()
  </code></pre>
  
  <p>Any help will be greatly appreciated, all the solutions I have found online have not worked for me.</p>