godotengine / godotengine/godot-cpp

[3.4] Default api.json file shipped in the branch breakes binding_generator.py execution

未關閉
#653 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
C++
星號
2.7k
分支
809
平均合併
1 天 3 小時
30 天內合併 PR
8

描述

Hi there,
I've just switched to 3.4 and wanted to update my godot-cpp build.
I'm running `scons SConstruct platform=linux generate_bindings=yes use_custom_api_file=yes custom_api_file=godot-headers/extension_api.json bits=64 use_llvm=yes -j8`, with `extension_api.json` being the default json provided along with the 3.4 branch.

I get the following python error :
```
TypeError: string indices must be integers:
File "/path/to/godot-cpp/SConstruct", line 467:
binding_generator.generate_bindings(json_api_file, env['generate_template_get_node'])
File "/path/to/godot-cpp/binding_generator.py", line 69:
used_classes = get_used_classes(c)
File "/path/to/godot-cpp/binding_generator.py", line 807:
for method in c["methods"]:
```

Here is the code pointed out by the error (iterating a dictionary indeed gives the key, which is a string, so not supposed to be accessed by index, am I wrong ?):
https://github.com/godotengine/godot-cpp/blob/68ce78179f90be9bec8cc88106dba0c244bdc4f6/binding_generator.py#L67-L69

Is it reproduced by you guys ?
Any idea to workaround is welcomed ! Alternatively please tell me if I've missed something !

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。