--- a/src/eric7/Utilities/ModuleParser.py Sun Feb 18 12:23:14 2024 +0100 +++ b/src/eric7/Utilities/ModuleParser.py Sun Feb 18 17:31:14 2024 +0100 @@ -1689,7 +1689,8 @@ isRemoteFileName = FileSystemUtilities.isRemoteFileName(module) if isRemoteFileName: - module, extension = os.path.splitext(os.path.basename(module)) + fsInterface = ericApp().getObject("EricServer").getServiceInterface("FileSystem") + module, extension = fsInterface.splitext(fsInterface.basename(module)) else: with contextlib.suppress(ValueError): _extensions.remove(".py") @@ -1732,13 +1733,9 @@ return mod if isRemoteFileName: - if ( - not ericApp() - .getObject("EricServer") - .getServiceInterface("FileSystem") - .exists(modname) - ): + if not fsInterface.exists(modname): raise ImportError + if extension == ".ptl": moduleType = PTL_SOURCE elif extension == ".rb":