Gut
Gut copied to clipboard
malformed "source_code_pro.fnt"?
When adding GUT 9.0.1 (via AssetLib) to my Godot 4.0.2 project it hangs on importing "source_code_pro.fnt"
Checking out the Godot console reveals there seems to be some Unicode parsing issues:
GUT config loaded
ERROR: Cannot open file 'res://.godot/imported/source_code_pro.fnt-042fb383b3c7b4c19e67c852f7fbefca.fontdata'.
at: (core/io/resource_format_binary.cpp:1249)
Unicode parsing error, some characters were replaced with spaces: Invalid UTF-8 leading byte (90)
Unicode parsing error, some characters were replaced with spaces: Invalid UTF-8 leading byte (8e)
Unicode parsing error, some characters were replaced with spaces: Invalid UTF-8 leading byte (89)
Unicode parsing error, some characters were replaced with spaces: Invalid UTF-8 leading byte (a8)
...
this goes on seemingly forever, currently Godot import is still at 0% and has been trying to import this for 5 minutes while spamming Unicode parsing errors.
I tried redownloading the file from GitHub manually and replaced it -> no change.
All other GUT files and fonts import without issue.
using Windows 11
I do not currently have access to a Windows 11 box. If anyone can verify and attempt a fix, please post here.
Similar, but I get it for the following
ERROR: Cannot open file 'res://.godot/imported/AnonymousPro-Bold.ttf-9d8fef4d357af5b52cd60afbe608aa49.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/AnonymousPro-BoldItalic.ttf-4274bf704d3d6b9cd32c4f0754d8c83d.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/AnonymousPro-Italic.ttf-9989590b02137b799e13d570de2a42c1.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/AnonymousPro-Regular.ttf-856c843fd6f89964d2ca8d8ff1724f13.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/CourierPrime-Bold.ttf-1f003c66d63ebed70964e7756f4fa235.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/CourierPrime-BoldItalic.ttf-65ebcc61dd5e1dfa8f96313da4ad7019.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/CourierPrime-Italic.ttf-baa9156a73770735a0f72fb20b907112.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/CourierPrime-Regular.ttf-3babe7e4a7a588dfc9a84c14b4f1fe23.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/LobsterTwo-Bold.ttf-7c7f734103b58a32491a4788186f3dcb.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/LobsterTwo-BoldItalic.ttf-227406a33e84448e6aa974176016de19.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/LobsterTwo-Italic.ttf-f93abf6c25390c85ad5fb6c4ee75159e.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/LobsterTwo-Regular.ttf-f3fcfa01cd671c8da433dd875d0fe04b.fontdata'.
ERROR: Cannot open file 'res://.godot/imported/source_code_pro.fnt-042fb383b3c7b4c19e67c852f7fbefca.fontdata'.
Win10
https://stackoverflow.com/questions/75629016/opening-file-from-windows-gives-unicodedecodeerror-utf-8-codec-cant-decode-b
Opening source_code_pro in notepad, overwritting as UTF8 seemed to fix things, I cant see anything abnormal. No errors opening other fonts anymore either.
Sorry for not branching etc
Ran into this today on linux while reimporting all my imports - it kept hanging on gut (same errors as above) - replacing source_code_pro.fnt with the zipped file allowed my reimport to finish - thanks much @nijbuu for sharing!
(sorry for the mention just above, the "Gut in CI" issue you see above is unrelated to this one, the only common point is to have errors when opening a project for the first time)
So, shall I send a PR with the source_code_pro.fnt resaved with UTF-8 encoding? Problem is, I cannot repro 100% since the second time I open the project, the issue is gone, whether I resaved source_code_pro.fnt as UTF-8 or not.
Should I clear the .godot folder before every open to compare what happens when I open the project in a fresh manner with, and without the source_code_pro.fnt encoded as UTF-8?
This should now be fixed in godot_4 branch. Will be in next release (9.1.2 probably soonish).
9.2 has been released.