Zowe - ZWEL0318E - Couldn't read file
search cancel

Zowe - ZWEL0318E - Couldn't read file

book

Article ID: 430273

calendar_today

Updated On:

Products

Zowe

Issue/Introduction

ZWEL0318E - Couldn't read file '/path/to/zwe.yaml': invalid leading UTF-8 octet, #83 at 0

Cause

On the mainframe, the problematic HEX character shows as 3F.

Resolution

In VS Code, simply replacing the invalid character with the correct separators (:, ;, ,) and saving the YAML resolves the issue.

To verify on USS:

Run the following commands where /var/zowe/zwe.yaml is located:

Display the line with special characters.

For example:

nl -ba /var/zowe/zwe.yaml | sed -n '470,485p'

Locate the initialHosts line number:

grep -n "initialHosts:" /var/zowe/zwe.yaml

Dump the exact bytes to confirm the control character:

sed -n '476p' /var/zowe/zwe.yaml | od -An -tx1 -c

If the validator reports #1a, the odd output will show byte 1a in the line.

If the invalid character is confirmed as hex 0x1A, run:

perl -pi -e 's/\x1a([0-9])/:$1/g; s/([0-9])\x1a,/$1,/g' /var/zowe/zwe.yaml

Then re-run validation:

zwe config validate -c /var/zowe/zwe.yaml