7 Replies Latest reply: Apr 27, 2017 11:56 AM by Chris Larsen RSS

    Problem connecting to Engine API through Python or HTML

    Chris Karras

      Hello,

       

      Today i upgraded Qlik Sense desktop to the latest edition (3.1.4) after having my existing one expired. We have developed a series of internal tools based on Python that we need to test them as a POC against desktop edition, before we move them to Qlik Sense. We haven't test them against server though.

       

      It is impossible to connect to Engine API through python and/or raw HTML code after the upgrade. Unfortunately i can't revert to the previous version.

       

      A small sample that used to work is like that

       

      >>>>>>>>>>>>>>>CODE START>>>>>>>>>>>>>>>>>>>>>>>>

      from websocket import create_connection

      import json

      data=json.dumps({

                          'jsonrpc': '2.0',

                          'id': 0,

                          'method': 'OpenDoc',

                          'handle': -1,

                          'params': ['test.qvf']

                      },

                          sort_keys=True,

                       indent=4,

                       separators=(',', ': '))

       

       

      ws = create_connection("ws://localhost:4848")

      print("Sending req...")

      ws.send(data)

      print("Sent")

      print("Receiving...")

      result =  ws.recv()

      print("Received '%s'" % result)

      #ws.close()


      print("press enter")

      <<<<<<<<<<<<<<<<<<<<CODE END<<<<<<<<<<<<<<

       

      The exception is like that

      exception.jpg

       

      This same exception is raised also when i try to connect through HTML's websockets.

       

      The code is tested in the corporate PC as well in my private one, just to confirm that a possible network issue stops the connection.

       

      Thank you for your help

      Chris K.