Skip to content

Commit 0104774

Browse files
committed
fix: resource path pyinstaller one file
1 parent 4b07fc8 commit 0104774

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/get_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
def resource_path(relative_path):
66
"""Get absolute path to resource, works for dev, PyInstaller and cx_Freeze."""
77
if getattr(sys, "frozen", False):
8-
base_path = path.dirname(sys.executable)
8+
base_path = getattr(sys, "_MEIPASS", path.dirname(sys.executable))
99
else:
1010
base_path = path.abspath(".")
1111
return path.join(base_path, relative_path)

0 commit comments

Comments
 (0)