Forum

[SOLVED] Fixbug in project_cli.py KeyError: 'src' when compile in console.

15 April 2016 13:47
I have fixed one error when compile with console.

error:
Traceback (most recent call last):
  File "project.py", line 44, in <module>
    project_cli.run(sys.argv, base_dir)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/project_cli.py", line 192, in run
    run_compile(args[1:], proj_path)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/project_cli.py", line 874, in run_compile
    compile_app(**params)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/project_cli.py", line 1039, in compile_app
    js_paths = exist_js(parser.js, js_files, build_proj_path)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/project_cli.py", line 1542, in exist_js
    print(item["src"])
KeyError: 'src'



Solution in file blend4web_sdk_free/scripts/lib/project_cli.py line 1542:

 for item in included_files:
        if len(item) > 0:
            if "src" in item:
                js_src = normpath(join(app_path_name, item["src"]))


This fix for me.
15 April 2016 14:35
Hi! Yes, it was a bug. It was fixed in 16.03:

https://github.com/TriumphLLC/Blend4Web/blob/master/scripts/lib/project_cli.py#L1545

I suppose you have an older version of b4w SDK.
15 April 2016 14:44
Yes.. I have 16.2.0

Nice!! :)
 
Please register or log in to leave a reply.