godotengine / godotengine/godot-cpp

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

オープン
#653 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
C++
スター
2.7k
フォーク
809
平均マージ
1日 3時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。