How to execute PyQt5 application on a resful call
问题 Context: I have a Flask application serving a resource POST /start . The logic to be executed involves a PyQt5 QWebEnginePage loading a URL and returning certain data about it. Problem: When the QApplication is executed (calling app.exec_() ) I get the warning: WARNING: QApplication was not created in the main() thread. and then the error: 2019-07-17 13:06:19.461 Python[56513:5183122] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /BuildRoot/Library/Caches/com.apple.xbs