Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 ---------------------------------------------")
    visualise_instance.run()
    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.

    Bug_screenshot

    Do you have any ideas?

    Thanks



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

    Change this line

    app.run_server(debug = True)
    

    to

    app.run_server()
    

Log in to reply