We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc47843 commit 9113282Copy full SHA for 9113282
source/loaders/py_loader/source/py_loader_impl.c
@@ -1562,6 +1562,8 @@ int py_loader_impl_initialize_import(loader_impl_py py_impl)
1562
" return importlib.import_module(module_name)\n"
1563
" else:\n"
1564
" spec = importlib.util.spec_from_file_location(module_name, path)\n"
1565
+ " if spec is None:\n"
1566
+ " raise ModuleNotFoundError('File ' + path + ' could not be found')\n"
1567
" m = importlib.util.module_from_spec(spec)\n"
1568
" spec.loader.exec_module(m)\n"
1569
" return m\n"
0 commit comments