You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I start to convert my 3.x project to 4.0, and run 'gdformat' command to format my script.
But I got an error like this:
C:\Users\73517>gdformat C:\Users\73517\OneDrive\Godot\Project\equipment-manage-system\addons\table\Table.gd
Traceback (most recent call last):
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\Scripts\gdformat.exe_main.py", line 7, in
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\site-packages\gdtoolkit\formatter_main.py", line 71, in main format_files(files, line_length, safety_checks)
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\site-packages\gdtoolkit\formatter_main.py", line 145, in _format_files
code = fh.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 335: illegal multibyte sequence
I wrote many script comments in Chinese, I'm sure that this is the reason of the error.
Because of lacking of knowledge of character coding and python, I don't know how to solve it.
The text was updated successfully, but these errors were encountered:
I start to convert my 3.x project to 4.0, and run 'gdformat' command to format my script.
But I got an error like this:
C:\Users\73517>gdformat C:\Users\73517\OneDrive\Godot\Project\equipment-manage-system\addons\table\Table.gd
Traceback (most recent call last):
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\Scripts\gdformat.exe_main.py", line 7, in
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\site-packages\gdtoolkit\formatter_main.py", line 71, in main
format_files(files, line_length, safety_checks)
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\site-packages\gdtoolkit\formatter_main.py", line 145, in _format_files
code = fh.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 335: illegal multibyte sequence
I wrote many script comments in Chinese, I'm sure that this is the reason of the error.
Because of lacking of knowledge of character coding and python, I don't know how to solve it.
The text was updated successfully, but these errors were encountered: