Hi Zemaxers
I am trying the python sample code of ZOS-API (as attached below). But it does not work at the first step.
The error shows as below
AttributeError: 'PythonStandaloneApplication' object has no attribute 'TheApplication'
(after checking the zemax install root , I guess it has something with 'TheApplication' attribute)
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/48ec4bd6-db60-43eb-ac9c-d51f23ffbb93.png)
Environment
python 3.10
PyCharm Community Edition 2022.1
Ansys Zemax OpticStudio 2024 R1.03
pythonnet version 3.0.3
Attached code
What I have done:
checked the address below, it is correct
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/5f90b7ae-28a3-4e20-b8ee-29af48b2ecbd.png)
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/1a995572-9808-4267-b64d-a65ab1534685.png)
Could you give me some advice on this issue?
Thank you
YANG