Qt World Summit: Submit your Presentation

QtPy Interface and Plotly Dash server

  • Hi everyone,

    I'm currently blocked in a strange situation. I'm using QtPy interface to run an instance class containing a Dash App server. The problem is when I start app.run_server(debug=True) the interface is loading again, stopping at the same time the Dash server and crashing the whole application.

    #Function run() in Visualise class
    def run(self):
          self.dataTreatment(app) #Parse Data for Dash
          self.graphsDash(app) #Create Dash components
    print("----------------------------------------------------- 3 ---------------------------------------------")
          app.run_server(debug=True) #Start Dash server
    print("----------------------------------------------------- 4 ---------------------------------------------")
    #Function called from UI mainwindow class
    visualise_instance = visualize.Visualise(args)
    print("----------------------------------------------------- 1 ---------------------------------------------")
    print("----------------------------------------------------- 2 ---------------------------------------------")

    There is no call of UImainwindow class in visualize file, the file is not even imported. Actually, the process doesn't come back to the interface class.

    I tried to run the class using threading and QThread manipulation but it always does the same thing.


    Do you have any ideas?


  • So apparently, this is due to the Dash debug mode. I don't know why, however.

    Change this line

    app.run_server(debug = True)



Log in to reply