


{"id":283750,"date":"2023-05-13T05:14:36","date_gmt":"2023-05-13T05:14:36","guid":{"rendered":"\/forum\/forums\/topic\/the-following-error-was-receivedfailed-to-evaluate-code-when-using-lumopt\/"},"modified":"2023-05-13T05:14:36","modified_gmt":"2023-05-13T05:14:36","slug":"the-following-error-was-receivedfailed-to-evaluate-code-when-using-lumopt","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/the-following-error-was-receivedfailed-to-evaluate-code-when-using-lumopt\/","title":{"rendered":"The following error was received:Failed to evaluate code when using lumopt."},"content":{"rendered":"<p>I&#8217;m trying to&nbsp; inversely design a structure of waveguide by using lumopt, and i follow the example of Y splitter to determine the base structure.Then i modified the python code for topology optimization, but i receive the following error, which i cannot deal with. Can you give me some useful advice? Thanks so much.<\/p>\n<p>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumopt\\optimization.py&#8221;, line 469, in run<br \/>&nbsp; &nbsp; self.initialize(working_dir)<br \/>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumopt\\optimization.py&#8221;, line 543, in initialize<br \/>&nbsp; &nbsp; self.base_script(self.sim.fdtd)<br \/>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumopt\\utilities\\base_script.py&#8221;, line 42, in __call__<br \/>&nbsp; &nbsp; return self.eval(cad_handle)<br \/>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumopt\\utilities\\base_script.py&#8221;, line 52, in eval<br \/>&nbsp; &nbsp; return cad_handle.eval(self.script_str)<br \/>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumapi.py&#8221;, line 1184, in eval<br \/>&nbsp; &nbsp; evalScript(self.handle, code)<br \/>&nbsp; File &#8220;C:\\Program Files\\Lumerical\\v202\\api\\python\\lumapi.py&#8221;, line 248, in evalScript<br \/>&nbsp; &nbsp; raise LumApiError(&#8220;Failed to evaluate code&#8221;)<br \/>lumapi.LumApiError: &#8216;Failed to evaluate code&#8217;<\/p>\n","protected":false},"template":"","class_list":["post-283750","topic","type-topic","status-closed","hentry","topic-tag-inverse-design-2"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["284793","30281"],"_bbp_author_ip":["23.47.145.29"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1438"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["283750"],"_bbp_forum_id":["27833"],"_bbp_engagement":["30281","284793"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["286233"],"_bbp_last_active_id":["286233"],"_bbp_last_active_time":["2023-05-29 21:49:25"]},"test":"a112374543outlook-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/283750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/283750\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=283750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}