diff --git a/solara/server/reload.py b/solara/server/reload.py index 26aa90a45..d2bdf9596 100644 --- a/solara/server/reload.py +++ b/solara/server/reload.py @@ -176,7 +176,7 @@ def get_reload_module_names(self): if name in self.ignore_modules: continue # nothing we imported from solara itself like starlette etc # we only reload modules that are in the root path - if getattr(mod, "__file__", "").startswith(str(self.root_path)): + if (getattr(mod, "__file__", None) or "").startswith(str(self.root_path)): reload.append(name) return reload