Skip to content

Commit

Permalink
__file__ can be None
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jun 28, 2023
1 parent 72e2c8b commit 1df4026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solara/server/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1df4026

Please sign in to comment.