diff --git a/python/socha/utils/package_builder.py b/python/socha/utils/package_builder.py index c641748..e930cce 100644 --- a/python/socha/utils/package_builder.py +++ b/python/socha/utils/package_builder.py @@ -96,7 +96,7 @@ def _get_modules(): ) main_modules = { name for name in main_modules - if hasattr(sys.modules[name], "__file__") + if hasattr(sys.modules[name], "__file__") and sys.modules[name].__file__ is not None and (os.path.abspath(os.path.dirname(sys.modules[name].__file__)) == main_dir or os.path.abspath(os.path.dirname(sys.modules[name].__file__)).startswith(main_dir + os.path.sep)) }