java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ +

JIRA | Earl Hathaway | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    from the console: testfun <- function(df){ somevar1 <- max(df[,4]) } ^^ works testfun <- function(df){ somevar1 <- max(df[,4]) somevar2 <- min(df[,4]) } fails EDIT: NB, we need to accept functions w/ newlines in them 02:47:45.980 # Session ERRR WATER: + java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ + + at water.exec.Exec2.throwErr(Exec2.java:217) + at water.exec.Exec2.xpeek(Exec2.java:154) + at water.exec.ASTFunc.parseFcn(ASTFunc.java:51) + at water.exec.ASTOp.parse(ASTOp.java:226) + at water.exec.AST.parseVal(AST.java:39) + at water.exec.ASTApply.parsePrefix(AST.java:114) + at water.exec.ASTSlice.parse(AST.java:205) + at water.exec.ASTApply.parseInfix(AST.java:156) + at water.exec.AST.parseCXExpr(AST.java:22) + at water.exec.ASTAssign.parseNew(AST.java:402) + at water.exec.AST.parseCXExpr(AST.java:23) + at water.exec.ASTStatement.parse(AST.java:59) + at water.exec.Exec2.parse(Exec2.java:130) + at water.exec.Exec2.exec(Exec2.java:103) + at water.api.Exec2.serve(Exec2.java:34) + at water.api.Request.serveGrid(Request.java:129) + at water.Request2.superServeGrid(Request2.java:472) + at water.api.Exec2.serveGrid(Exec2.java:71) + at water.api.Request.serve(Request.java:108) + at water.api.RequestServer.serve(RequestServer.java:315) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) + at java.lang.Thread.run(Thread.java:724)

    JIRA | 3 years ago | Earl Hathaway
    java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ +
  2. 0

    from the console: testfun <- function(df){ somevar1 <- max(df[,4]) } ^^ works testfun <- function(df){ somevar1 <- max(df[,4]) somevar2 <- min(df[,4]) } fails EDIT: NB, we need to accept functions w/ newlines in them 02:47:45.980 # Session ERRR WATER: + java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ + + at water.exec.Exec2.throwErr(Exec2.java:217) + at water.exec.Exec2.xpeek(Exec2.java:154) + at water.exec.ASTFunc.parseFcn(ASTFunc.java:51) + at water.exec.ASTOp.parse(ASTOp.java:226) + at water.exec.AST.parseVal(AST.java:39) + at water.exec.ASTApply.parsePrefix(AST.java:114) + at water.exec.ASTSlice.parse(AST.java:205) + at water.exec.ASTApply.parseInfix(AST.java:156) + at water.exec.AST.parseCXExpr(AST.java:22) + at water.exec.ASTAssign.parseNew(AST.java:402) + at water.exec.AST.parseCXExpr(AST.java:23) + at water.exec.ASTStatement.parse(AST.java:59) + at water.exec.Exec2.parse(Exec2.java:130) + at water.exec.Exec2.exec(Exec2.java:103) + at water.api.Exec2.serve(Exec2.java:34) + at water.api.Request.serveGrid(Request.java:129) + at water.Request2.superServeGrid(Request2.java:472) + at water.api.Exec2.serveGrid(Exec2.java:71) + at water.api.Request.serve(Request.java:108) + at water.api.RequestServer.serve(RequestServer.java:315) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) + at java.lang.Thread.run(Thread.java:724)

    JIRA | 3 years ago | Earl Hathaway
    java.lang.IllegalArgumentException: Missing '}' testfun <- function(df){ somevar1 <- max(df[,4]) somevar2 <- min(df[,4])} ^-------------------------------------^
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I create Result3 as the copy of a data frame I do a column assign then I assign a scalar exec result to it. Normally scalars are not preserved when you leave exec When I then assign to Result3 col 1 in the next exec, exec says Result3 no longer exists I don't know what's the definition of correct here or how it affects h2o use in R (and python?) here's the sequence c.hex is a parsed data frame 2014-07-27 10:42:21.811949 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = c.hex 2014-07-27 10:42:23.918369 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 2014-07-27 10:42:24.372282 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = min(c.hex[,35]) 2014-07-27 10:42:24.548722 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 10:42:24.559 # Session ERRR WATER: + java.lang.IllegalArgumentException: Unknown var Result3 + Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 + ^------^ + + at water.exec.Exec2.throwErr(Exec2.java:262) + at water.exec.ASTAssign.parseNew(AST.java:435) + at water.exec.AST.parseCXExpr(AST.java:26) + at water.exec.ASTStatement.parse(AST.java:72) + at water.exec.Exec2.parse(Exec2.java:137) + at water.exec.Exec2.exec(Exec2.java:111) + at water.api.Exec2.serve(Exec2.java:35) + at water.api.Request.serveGrid(Request.java:168) + at water.Request2.superServeGrid(Request2.java:495) + at water.api.Exec2.serveGrid(Exec2.java:78) + at water.api.Request.serve(Request.java:145) + at water.api.RequestServer.serve(RequestServer.java:553) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) + at java.lang.Thread.run(Thread.java:744)

    JIRA | 3 years ago | Kevin Normoyle
    java.lang.IllegalArgumentException: Unknown var Result3 Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 ^------^

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ +

      at water.exec.Exec2.throwErr()
    2. water.exec
      Exec2.exec
      1. water.exec.Exec2.throwErr(Exec2.java:217)
      2. water.exec.Exec2.xpeek(Exec2.java:154)
      3. water.exec.ASTFunc.parseFcn(ASTFunc.java:51)
      4. water.exec.ASTOp.parse(ASTOp.java:226)
      5. water.exec.AST.parseVal(AST.java:39)
      6. water.exec.ASTApply.parsePrefix(AST.java:114)
      7. water.exec.ASTSlice.parse(AST.java:205)
      8. water.exec.ASTApply.parseInfix(AST.java:156)
      9. water.exec.AST.parseCXExpr(AST.java:22)
      10. water.exec.ASTAssign.parseNew(AST.java:402)
      11. water.exec.AST.parseCXExpr(AST.java:23)
      12. water.exec.ASTStatement.parse(AST.java:59)
      13. water.exec.Exec2.parse(Exec2.java:130)
      14. water.exec.Exec2.exec(Exec2.java:103)
      14 frames
    3. water.api
      Request.serveGrid
      1. water.api.Exec2.serve(Exec2.java:34)
      2. water.api.Request.serveGrid(Request.java:129)
      2 frames
    4. water
      Request2.superServeGrid
      1. water.Request2.superServeGrid(Request2.java:472)
      1 frame
    5. water.api
      RequestServer.serve
      1. water.api.Exec2.serveGrid(Exec2.java:71)
      2. water.api.Request.serve(Request.java:108)
      3. water.api.RequestServer.serve(RequestServer.java:315)
      3 frames
    6. water
      NanoHTTPD$HTTPSession.run
      1. water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:724)
      1 frame