jscompiler.py - WindowsError: [Error 87] The parameter is incorrect

478 views
Skip to first unread message

Guido Tapia

unread,
Jun 10, 2014, 1:05:27 AM6/10/14
to closure-comp...@googlegroups.com
Hi Guys,

I'm reaching a point in an app I have that adding any goog.require to a new file causes the compiler to throw this error:

Traceback (most recent call last):
  File "J:\dev\projects\fxa\isis\isis.web\lib\closure-library\closure\bin\build\closurebuilder.py", line 265, in <mod
ule>
    main()
  File "J:\dev\projects\fxa\isis\isis.web\lib\closure-library\closure\bin\build\closurebuilder.py", line 254, in main

    compiler_flags=options.compiler_flags)
  File "J:\dev\projects\fxa\isis\isis.web\lib\closure-library\closure\bin\build\jscompiler.py", line 133, in Compile
    return subprocess.check_output(args)
  File "C:\Anaconda\lib\subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "C:\Anaconda\lib\subprocess.py", line 709, in __init__
    errread, errwrite)
  File "C:\Anaconda\lib\subprocess.py", line 957, in _execute_child
    startupinfo)
WindowsError: [Error 87] The parameter is incorrect


If I limit the length of args in the call:
  return subprocess.check_output(args)
For instance if I do:
  return subprocess.check_output(args[:780])
Then the compiler runs ok.

Then this error does not show.  I think I am hitting some kind of limit passing args to the java VM?  Has anyone seen this before? I'm on Windows using x64 bit version of Java (Just tried latest version of Java and still happens).  There is around 1900 files that I am compiling (inc closure-lib) so I guess not a huge number.

Tnx

Guido Tapia

unread,
Jun 10, 2014, 1:09:37 AM6/10/14
to closure-comp...@googlegroups.com
Moving my project to the root of my drive fixes this also.  It must be a limit on the cumulative length or the arguments passed to the java compiler (from python).  So if lots of files and all in a deep directory then the length of args is huge....
Reply all
Reply to author
Forward
0 new messages