QtPy Interface and Plotly Dash server
Unsolved
Qt for Python
-
wrote on 6 Feb 2021, 12:37 last edited by
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.
Do you have any ideas?
Thanks
-
wrote on 6 Feb 2021, 14:18 last edited by
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()
1/2