I've created a simple plugin that requires PySide.QWebEngineView, which isn't available in PyQt5. What's the most elegant way to handle Pyside import errors?
The following code works, but I'm also getting an
Error Parsing Result XML. Start tag expected. error message.
Code:
import sys
try:
from PySide.QtWebEngineWidgets import QWebEngineView
# more PySide imports
except ModuleNotFoundError:
print('This plugin requires PySide.')
sys.exit()
Is there an easy way to suppress the
Error Parsing Result XML. Start tag expected. error message?