In a clean python venv, when aedttest is installed by pip install aedttest pyaedt==0.5.9 is installed. It is a very old version, which installs pythonnet==3.0.0.rc4. This old pythonnet pre-release version leads to code error.