Root Cause
- The trailing “unexpected end of JSON input” suggests the decoder aborted midway, producing invalid JSON.
- This mismatch between file content (likely UTF-8 or containing special characters) and default Windows decoding causes the issue.
Suggested Solutions
1. Force UTF-8 decoding in the Transpiler
If you have control over the CLI or transpiler's Python code, ensure file opening is done with: open(filename, 'r', encoding='utf-8')
2. Set Python's environment to use UTF-8 by default
You can try running the transpiler in UTF-8 mode using:
py -Xutf8 -m databricks.labs.lakebridge transpile ...
3. Convert files to UTF-8 before transpiling
If possible, ensure your source files are encoded in UTF-8. :
import codecs
with codecs.open(src, 'r', encoding='cp1252', errors='ignore') as f_in, \
codecs.open(dst, 'w', encoding='utf-8') as f_out:
f_out.write(f_in.read())
Pls let me know if any of the above works