Im facing a strange issue. I have downloaded and installed the Qt for Python library (PySide2) in the virtual environment of my project in PyCharm. I have created a dummy GUI using the Qt Designer and Im loading (.ui file) and displaying the GUI through my python code. Whenever I run the code, I can see the GUI without errors. However, whenever I debug the code, I get an error:
File "...\gui_pyside2.py", line 5, in
from PySide2.QtWidgets import QApplication, QLabel, QLineEdit
ImportError: DLL load failed: The specified procedure could not be found.
Pydev crashes on this line:
#execute the script (note: it's important to compile first to have the filename set in debug mode)
exec(compile(contents+"\n", file, 'exec'), glob, loc)
Im pretty lost on what could be the cause. It seems like pydev is interfering with the imports? I have tried using import statements instead of from import but the problem persists. Any ideas?
Versions installed:
Answering to my own question:
Turns out there's a compatibility setting in Pycharm for Pyside:

Set it to PySide and debugger runs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With