CML Compiler Command-Line Interface errors/warnings
If CML Compiler encounters any errors while building an element, it will skip that element and continue to build the subsequent ones. It also provides the user with useful error messages to help identify the source of the error - and debug it. The following is a table of the different error and warning messaged generated by CML Compiler:
Source File Exception | This error is usually triggered by an invalid source script. Please check the source (.json) file of the element and make sure there is no syntax error. |
Source File Error |
The syntax of the source file is generally correct, but the source script might have some other errors like using an undeclared variable, index out of range etc. When this error is triggered, a detailed message will be displayed along with it to help troubleshoot the problem. |
Validation script doesn't exist | This is a warning message that is displayed when the CML Compiler cannot find the data validation script for the current element. It might happen if the data validation script for that photonic model gets deleted or if the name of the photonic model is wrong in the .xml file. In case the validation script gets deleted, re-installing the CML Compiler should fix this issue. |
Data validation failed. Skipped the current element. | This error occurs when the provided source data is invalid. When triggered, a detailed message will be displayed for troubleshooting. Please refer to the data description sheet and check the data formats. |
Photonic Model Error | This error could be caused by errors in the data file that are not caught in the data validation step. Missing variables or invalid values in source file can also trigger this error. Please check the data description sheet and make sure that both the data and source file are valid. |
<element_name> already exists in user_created folder | All the user created elements must have a unique filename. If CML Compiler finds more than one user created elements with the same name, only the first one will be added to the library and this warning message will be showed. Rename the conflicting elements to resolve this issue. |
<element_name> already exists in the compiling list. The user created one is skipped. | When CML Compiler is adding user created elements, if an element with the same name already exists in the compiling list (.xml file), this warning message will show up. The user created one will not be added to the library. Rename the conflicting elements to resolve this issue. |
lumapi.py.LumApiError: 'Failed to launch application' | Check the INTERCONNECT path in lumapi.py, if you have made changes to the installation folder. |
Other Errors
CML Compiler stops at installing the cml when running with the "all" argument
Open INTERCONNECT and go to the Element Library. Find the library with the matching name within the Design Kits folder, and uninstall it by right-clicking the library name and selecting "uninstall". Then, run cml-compiler again using the following command to install your CML:
cml-compiler install
CML Compiler fails to locate Python API
As a CML Compiler user transitioning to Ansys Lumerical suite version 2020 R2, you might encounter the following error:
File "opt/lumerical/< version number >/api/python/lumapi.py, line 259, in evalScript
raise LumApiError("Failed to evaluate code")
lumapi.LumApiError: 'Failed to evaluate code'
If you see this error, please check to see if you have an environment variable "LUMERICAL_HOME" defined in your bashrc file (Linux) or system environment variables (Windows). It is recommended that you delete this environment variable.
Advanced: For users who installed Lumerical products in a non-default directory, please create an environment variable called "LUMERICAL_HOME" and specify its value to be the path of your Lumerical product installed directory. This will need to be updated every major release version.