A NoneType AttributeError inside dataclasses means your importlib-loaded module is missing from sys.modules
Loading a .py by path crashes in dataclasses._is_type when it uses future annotations. The fix: sys.modules[spec.name] = mod before exec_module.
