-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError when executing flet build on Windows (ja) #2448
Labels
bug
Something isn't working
Comments
I guess we should specify encoding in all |
FeodorFitsner
added a commit
that referenced
this issue
Jan 24, 2024
zrr1999
pushed a commit
to zrr1999/flet
that referenced
this issue
Jul 17, 2024
* Basic imports/exports * Moved models and protocols to their respective controls * Fix tests * Exports cleanup * Flet custom controls example with demo app * Working example for mycontrol * typeName > controlType renamed * src_pubspec_path * Inject Flutter dependencies to a template * Copy both dependencies and dependency_overrides * Fixed: `flet build` with `A package may not list itself as a dependency.` error occurs Fix flet-dev#2305 * All file operations with UTF-8 encoding Fix flet-dev#2448 * flet build -vv (maximum verbose) should yield verbose output from underlying flutter build command Close flet-dev#2454 * Pin `flet build` template to Flet version Close flet-dev#2459 * Do not use StoreConnector for dispatch * Get rid of StoreConnector wherever we can * updateControlProps, sendControlEvent * Make `page.platform` writable to test adaptive controls Close flet-dev#2470 * Get rid of dispatch across the code * sendControlEvent is used everywhere * Switch to mixins * Renamed mixins * Fix Pagelet control * FletStoreMixin added * Working with methods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When executing
flet build
on Windows with the system localeja
, a UnicodeDecodeError related to the 'cp932' codec occurs. Referring to yaml/pyyaml/issues/123, opening a yaml file using open() without specifying an encoding can cause this problem in some locales. Specifying open( ...coding='utf-8') may resolve the issue.Code example to reproduce the issue:
Describe the results you received:
When running
flet build windows
or other target, the following error occurs:Describe the results you expected:
The build process should complete successfully without encountering UnicodeDecodeError.
Workaround
I was able to successfully build by setting
Set PYTHONUTF8=1
before building.Additional information you deem important (e.g. issue happens only occasionally):
OS system locale is 'ja'.
Flet version (
pip show flet
):Operating system:
Windows 11 Pro
Additional environment details:
The text was updated successfully, but these errors were encountered: