NEW @W-22462042@ fix: flow engine fails on Windows for any flow containing a non-ASCII character - #494
Open
nikhil-mittal-165 wants to merge 1 commit into
Open
NEW @W-22462042@ fix: flow engine fails on Windows for any flow containing a non-ASCII character#494nikhil-mittal-165 wants to merge 1 commit into
nikhil-mittal-165 wants to merge 1 commit into
Conversation
|
Git2Gus App is installed but the |
nikhil-mittal-165
marked this pull request as ready for review
August 4, 2026 12:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root Cause
quick_validate() in FlowScanner/public/parse_utils.py:1418 opens flow files with open(flow_path,'r') and no encoding argument, so Python uses the platform locale encoding. On Windows (cp1252) any flow XML containing a non-cp1252 UTF-8 byte (e.g. 0x9D from U+201D smart quote) raises UnicodeDecodeError. The bare except logs CRITICAL and returns False, dropping the flow; when all flows are dropped the scanner prints 'No flow files found to scan. Exiting...' and never writes flowScannerResultsFile.json, so the Node wrapper FlowScannerCommandWrapper.js fails to read it and surfaces a misleading ENOENT UnexpectedEngineError. Flow XML is authored/declared UTF-8, so locale-based decoding is simply wrong. Confirmed by PYTHONUTF8=1 fixing it, and by the fact that main.py:104 and custom_parser.get_root already read/parse as UTF-8 correctly.
Fix
Read flow files as UTF-8 (with cp1252 fallback) in quick_validate so UTF-8 flows with non-cp1252 bytes are not dropped on Windows locales; added Python unittest coverage and bumped package to 0.40.1-SNAPSHOT
Testing
Functional Testing Evidence
Tested on Dreamhouse project:
Overall Status: PASS ✅
Files Changed