niklas2902 / py4godot

Python scripting for Godot. This GDExtension plugin allows you to use Python like GDScript, accessing the Godot engine's features and benefiting from Python's vast ecosystem.
MIT License
64 stars 7 forks source link

Error generating generate_*.py in a non-UTF-8 operating system #49

Closed zack-luan closed 2 months ago

zack-luan commented 2 months ago

For example, in line 1918 of generate_classes_cpp.py, the following code: with open('py4godot/gdextension-api/extension_api.json', 'r', encoding='utf-8') as myfile: The absence of the encoding='utf-8' parameter causes an error when data = myfile.read() is executed, and it is hoped that this can be improved.

niklas2902 commented 2 months ago

I'm very sorry. I hope, I fixed it now