From b92720c0449abe2c4ebdb4a4a94f7a496dbe41d1 Mon Sep 17 00:00:00 2001 From: Elijah Date: Tue, 14 Jan 2025 11:40:37 +0000 Subject: [PATCH] use the resolved module path --- reflex/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/config.py b/reflex/config.py index cade4224b..65188f8da 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -746,9 +746,9 @@ class Config(Base): module_name = Path(path).stem module_path = Path(path).resolve() sys.path.insert(0, str(module_path.parent.parent)) - spec = spec_from_file_location(module_name, path) + spec = spec_from_file_location(module_name, module_path) if not spec: - raise ConfigError(f"Could not load module from path: {path}") + raise ConfigError(f"Could not load module from path: {module_path}") module = module_from_spec(spec) # Set the package name to the parent directory of the module (for relative imports) module.__package__ = module_path.parent.name