From cac5ab8d0203c03f4f1be648475285b1e7ff85c8 Mon Sep 17 00:00:00 2001 From: b0xcat Date: Wed, 13 May 2026 23:31:24 +0200 Subject: [PATCH 1/2] Fix previously installed apps not launching when using mpremote mount --- modules/system/launcher/app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/system/launcher/app.py b/modules/system/launcher/app.py index c2165feb..5af126c8 100644 --- a/modules/system/launcher/app.py +++ b/modules/system/launcher/app.py @@ -154,6 +154,16 @@ def launch(self, item): try: module = __import__(module_name, None, None, (fn,)) app = getattr(module, fn)() + except ImportError as e: + cwd = os.getcwd() + if "no module named 'apps'" in str(e) and cwd == "/remote": + print("Failed to launch app from mpremote mount, launching from internal storage instead") + os.chdir("/") + module = __import__(module_name, None, None, (fn,)) + app = getattr(module, fn)() + os.chdir(cwd) + else: + raise except Exception as e: print(f"Error creating app: {e}") sys.print_exception(e, sys.stderr) From 0088ecf0454261eae4b32618fd0807bfd8acfd02 Mon Sep 17 00:00:00 2001 From: b0xcat Date: Thu, 14 May 2026 00:03:52 +0200 Subject: [PATCH 2/2] Formatting --- modules/system/launcher/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/launcher/app.py b/modules/system/launcher/app.py index 5af126c8..73f12f40 100644 --- a/modules/system/launcher/app.py +++ b/modules/system/launcher/app.py @@ -157,7 +157,9 @@ def launch(self, item): except ImportError as e: cwd = os.getcwd() if "no module named 'apps'" in str(e) and cwd == "/remote": - print("Failed to launch app from mpremote mount, launching from internal storage instead") + print( + "Failed to launch app from mpremote mount, launching from internal storage instead" + ) os.chdir("/") module = __import__(module_name, None, None, (fn,)) app = getattr(module, fn)()