


{"id":308866,"date":"2023-09-26T21:15:18","date_gmt":"2023-09-26T21:15:18","guid":{"rendered":"\/forum\/forums\/topic\/remote-python-script-stopped-working-after-os-update\/"},"modified":"2023-09-28T21:41:20","modified_gmt":"2023-09-28T21:41:20","slug":"remote-python-script-stopped-working-after-os-update","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/remote-python-script-stopped-working-after-os-update\/","title":{"rendered":"Remote Python script stopped working after OS update"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>Last week, I was running a python script remotely through Lumerical&#8217;s Interop Server. This week, we updated the workstation (Ubuntu 22.04) that runs the server and now the exact same script gives the following error:<\/p>\n<pre><span style=\"font-size: 12pt\">&nbsp; &nbsp; &nbsp; 1 remoteArgs={ \"hostname\": \"127.0.0.1\", \"port\": 8989}<\/span><br><span style=\"font-size: 12pt\">----&gt; 2 fdtd = lumapi.FDTD(hide=True, remoteArgs=remoteArgs)<\/span><br><br><span style=\"font-size: 12pt\">File \/opt\/lumerical\/v231\/api\/python\/lumapi.py:1506, in FDTD.__init__(self, filename, key, hide, serverArgs, remoteArgs, **kwargs)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1505 def __init__(self, filename=None, key=None, hide=False, serverArgs={}, remoteArgs={}, **kwargs):<\/span><br><span style=\"font-size: 12pt\">-&gt; 1506 &nbsp; &nbsp; super(FDTD, self).__init__('fdtd', filename, key, hide, serverArgs, remoteArgs, **kwargs)<\/span><br><br><span style=\"font-size: 12pt\">File \/opt\/lumerical\/v231\/api\/python\/lumapi.py:1172, in Lumerical.__init__(self, product, filename, key, hide, serverArgs, remoteArgs, **kwargs)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1161 \"\"\"Keyword Arguments:<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1162 &nbsp; &nbsp; &nbsp; &nbsp; script: A single string containing a script filename, or a collection of strings<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1163 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; that are filenames. Preffered types are list and tuple, dicts are not<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;(...)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1169 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;opened before any scripts specified by the script keyword are run.<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1170 \"\"\"<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1171 iapi = initLib(remoteArgs)<\/span><br><span style=\"font-size: 12pt\">-&gt; 1172 handle = self.__open__(iapi, product, key, hide, serverArgs, remoteArgs)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1173 self.handle = LumApiSession(iapi, handle)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1175 self.syncUserFunctionsFlag = False<\/span><br><br><span style=\"font-size: 12pt\">File \/opt\/lumerical\/v231\/api\/python\/lumapi.py:1380, in Lumerical.__open__(self, iapi, product, key, hide, serverArgs, remoteArgs)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1378 &nbsp; &nbsp; &nbsp; &nbsp; error = iapi.appGetLastError()<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1379 &nbsp; &nbsp; &nbsp; &nbsp; error = error.contents.str[:error.contents.len].decode('utf-8')<\/span><br><span style=\"font-size: 12pt\">-&gt; 1380 &nbsp; &nbsp; &nbsp; &nbsp; raise LumApiError(error)<\/span><br><span style=\"font-size: 12pt\">&nbsp; &nbsp;1382 return h<\/span><br><br><span style=\"font-size: 12pt\">LumApiError: 'Exception [::appOpened]: Session not found'<\/span><\/pre>\n<p>I have recreated the previous setup as much as possible, including rolling back the linux kernel to a version where everything worked, but the script returns the same error no matter what. Any suggestions?<\/p>\n<p>&nbsp;<\/p>\n<p>Best,<\/p>\n<p>Anders<\/p>\n","protected":false},"template":"","class_list":["post-308866","topic","type-topic","status-closed","hentry","topic-tag-error","topic-tag-lumapi-2","topic-tag-remote-server-2"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["28267","4274"],"_bbp_author_ip":["96.7.218.215"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["335"],"_edit_lock":["1695762980:232687"],"_bbp_status":["publish"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["308866"],"_bbp_forum_id":["27833"],"_bbp_engagement":["4274","28267"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["309264"],"_bbp_last_active_id":["309264"],"_bbp_last_active_time":["2023-09-28 11:38:00"]},"test":"asimonsennbi-ku-dk"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/308866","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\/308866\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=308866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}