Lumapi module always raises AttributeError
Issue:
The lumapi
module always raises the AttributeError
when any of the methods of the lumapi.FDTD
class are called.
Description:
Our group is currently trying to create a data creation workflow in Python and use Lumerical FDTD (or MODE) to simulate the propagation of light on chip for certain devices. We would like to run Lumerical FDTD simulation with GPU enhancement to improve our data creation speed process. To do this we have chosen to use lumapi
and we have managed to get it working on older versions (and older GPUs) but unfortunately, we couldn’t get it to work on the latest version (v242) on our computer that has a 4090 GPU.
Environment:
OS: Windows 11
Lumerical Python API version: 242
Python IDE: Visual Studio Code or PyCharm (we have tried both)
Python version: 3.10, 3.11, or 3.12 (we have tried multiple Python versions)
To reproduce:
- Create a Python file in the IDE and import
lumapi
as shown in the [example] (https://optics.ansys.com/hc/en-us/articles/360041873053-Session-management-Python-API). - Launch an FDTD or MODE session (e.g
lumapi.FDTD(hide=False)
). This step works perfectly and the Python environment is able to communicate with Lumerical. - Use any of lumapi.FDTD class methods.
Expected behaviour:
Using any of the lumapi.FDTD
class methods (such as addfdtd
or addrect
) will always raise the issue AttributeError: 'NoneType' object has no attribute 'strip'
. We have tried multiple environments or Python versions, but this error is always raised. Interestingly enough, this error was not encountered when we tried the same exact code on other computers that had older versions of the API (v241 and v232).
Answers
-
Hi,
For more information on FDTD GPU feature, please check out: https://optics.ansys.com/hc/en-us/articles/17518942465811-Getting-started-with-running-FDTD-on-GPU
For better guidance I would recommend creating a ticket in ACSS:
https://customer.ansys.com/If you are an academic user please use ALF: https://innovationspace.ansys.com/forum/forums/forum/discuss-simulation/photonics/
Thank you
0