Strange error while using Pycharm to debug PyQt gui

I ran into the same issue, and it took me a while but I found a solution that works for me. I believe what happens, is that the debugger is looking for the module _pydevd_bundle.pydevd_cython in a directory code. However, because you are running the script out of your own code directory, the debugger checks your folder, sees their is no module, and throws the error. That would explain why deleting the __init__.py works, because the debugger won't confuse the two directories anymore.

So, renaming your code directory to something else, should fix the issue and let you keep the init file.