godotengine / godotengine/godot-cpp

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

Aperta
#653 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
C++
Stelle
2.7k
Fork
809
Merge medio
1g 3h
PR unite (30g)
8

Descrizione

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 !

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.