On Ubuntu 22.04, using Python 3.10.4, I've setup PyCharm community edition 2022.01 to use PySide2 designer (Qt) as an external tool. When I press the "create" button this error is produced and the process terminates. Similar reports in last 6 years and 6 months didn't work for me and PySide2 requires a special patch to work with Python3.10.4.
In PyCharm external tool QtDesigner5, program venv_dir/bin/pyside2-designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.
As additional info. PySide2 was built from 5.15.2 Qt maintenance tool sources and has pyside-setup branch set to 5.15. All traces of pyside2 and shiboken2 had previously been safely removed from Ubuntu system, as they cause numerous errors. One change was applied to sources: https://bugzilla.redhat.com/show_bug.cgi?id=2025599 (thanks Petr Viktorin 2022-01-21 16:46:48 UTC). Clean 'bdist_wheel' and 'install'. This does not affect PySide6 (6.3.0), which works without any issue.