diff --git a/eel/__init__.py b/eel/__init__.py index 1f9d8bf4..4ff8188c 100644 --- a/eel/__init__.py +++ b/eel/__init__.py @@ -312,8 +312,10 @@ def _process_message(message, ws): def _get_real_path(path): - if getattr(sys, 'frozen', False): + if getattr(sys, 'frozen', False) and hasattr(sys, "_MEIPASS"): return os.path.join(sys._MEIPASS, path) + elif getattr(sys, 'frozen', False): + return os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), path) else: return os.path.abspath(path)