crash6 / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

build failed: build.py line 251, in file_lookup: list index out of range #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I changed some code, add a self block in Blockly.Blocks.variables, and run well 
with uncompressed js file.
Then I tried to execute build.py, following error occurred:

FATAL ERROR
Parse error. IE8 (and below) will parse trailing commas in array and object 
literals incorrectly. If you are targeting newer versions of JS, set the 
appropriate language_in option.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "./build.py", line 151, in run
    self.gen_blocks()
  File "./build.py", line 205, in gen_blocks
    self.do_compile(params, target_filename, filenames, remove)
  File "./build.py", line 264, in do_compile
    file_lookup(error['file']), error['lineno']))
  File "./build.py", line 251, in file_lookup
    return filenames[n]
IndexError: list index out of range

Original issue reported on code.google.com by xuy...@gmail.com on 10 Jun 2014 at 8:32

GoogleCodeExporter commented 9 years ago
Without knowing exactly what you changed, I can't tell you where your bug is.  
But it is clearly an extra comma at the end of some array or object you edited.

var someObject = {a: 1, b: 2, c: 3,};
or
var someArray = [1, 2, 3,];

In both cases the last comma should not be there.

Original comment by neil.fra...@gmail.com on 12 Jun 2014 at 3:44