Skip to content

Commit da3143e

Browse files
committed
Fix encode() import in PyInstaller integration
Fix #1031
1 parent 982ee21 commit da3143e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

sdk/python/packages/flet/src/flet/__pyinstaller/win_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
from PyInstaller.building.icon import normalize_icon_type
99
from PyInstaller.compat import win32api
1010
from PyInstaller.utils.win32.icon import IconFile, normalize_icon_type
11-
from PyInstaller.utils.win32.versioninfo import decode
11+
12+
try:
13+
# PyInstaller 5.7.0
14+
from PyInstaller.utils.win32.versioninfo import decode
15+
except ImportError:
16+
# PyInstaller 5.8.0
17+
from PyInstaller.utils.misc import decode
1218

1319

1420
def update_flet_view_icon(exe_path, icon_path):

sdk/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pytest = "^7.2.0"
1515
black = "^22.12.0"
1616
tomlkit = "^0.11.6"
1717
cryptography = "^39.0.0"
18-
pyinstaller = "^5.7.0"
18+
pyinstaller = "^5.8.0"
1919
pillow = "^9.4.0"
2020
pre-commit = "^2.21.0"
2121

0 commit comments

Comments
 (0)