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

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

Traceback (most recent call last):
  File "", line 44, in <module>, base_dir)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/", line 192, in run
    run_compile(args[1:], proj_path)
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/", line 874, in run_compile
  File "/Users/EDICION5/Downloads/Blend4Web/blend4web_sdk_free/scripts/lib/", 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/", line 1542, in exist_js
KeyError: 'src'

Solution in file blend4web_sdk_free/scripts/lib/ 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:

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.