diff --git a/picard/const/sys.py b/picard/const/sys.py index bff4d8bfe..8c32fc063 100644 --- a/picard/const/sys.py +++ b/picard/const/sys.py @@ -30,5 +30,5 @@ IS_HAIKU = sys.platform == 'haiku1' # These variables are set by pyinstaller if running from a packaged build # See http://pyinstaller.readthedocs.io/en/stable/runtime-information.html -IS_FROZEN = getattr(sys, 'frozen', False) +IS_FROZEN = getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS') FROZEN_TEMP_PATH = getattr(sys, '_MEIPASS', '') diff --git a/tagger.py.in b/tagger.py.in index 91bab7d67..ff34cf871 100644 --- a/tagger.py.in +++ b/tagger.py.in @@ -7,7 +7,7 @@ import sys sys.path.insert(0, '.') # This is needed to find resources when using pyinstaller -if getattr(sys, 'frozen', False): +if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): basedir = getattr(sys, '_MEIPASS', '') else: basedir = os.path.dirname(os.path.abspath(__file__))