java.util.IllegalFormatConversionException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • From h2ostream: Hello, I was just trying out the Scala REPL, and ran in to an issue while parsing a file. I tracked the issue down to csv(default) vs tsv. I can't quite manage to track back from the scala parse method to (where I assume) I will be able to set the separator char. -JD java.util.IllegalFormatConversionException: d != java.lang.Double at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) at java.util.Formatter.format(Formatter.java:2520) at java.util.Formatter.format(Formatter.java:2455) at java.lang.String.format(String.java:2925) at water.fvec.Frame.toString(Frame.java:457) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at scala.collection.immutable.NumericRange.foreach(NumericRange.scala:74) at water.api.dsl.Utils$.head(Utils.scala:62) at water.api.dsl.DFrame.toString(H2ODsl.scala:174) at scala.runtime.ScalaRunTime$.scala$runtime$ScalaRunTime$$inner$1(ScalaRunTime.scala:324) at scala.runtime.ScalaRunTime$.stringOf(ScalaRunTime.scala:329) at scala.runtime.ScalaRunTime$.replStringOf(ScalaRunTime.scala:337) at .<init>(<console>:10) at .<clinit>(<console>) at $print(<console>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734) at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983) at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568) at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:756) at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:801) at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:713) at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:577) at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:584) at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:587) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:878) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135) at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:833) at water.api.dsl.ShalalaRepl$.launchRepl(ShalalaRepl.scala:47) at water.api.dsl.ShalalaRepl$.userMain(ShalalaRepl.scala:31) at water.api.dsl.ShalalaRepl.userMain(ShalalaRepl.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at water.Boot.run(Boot.java:304) at water.Boot.boot2(Boot.java:280) at water.Boot.main(Boot.java:136) at water.Boot.main(Boot.java:126) at water.api.dsl.ShalalaRepl$.main(ShalalaRepl.scala:26) at water.api.dsl.ShalalaRepl.main(ShalalaRepl.scala)
    via by Michal Malohlava,
  • From h2ostream: Hello, I was just trying out the Scala REPL, and ran in to an issue while parsing a file. I tracked the issue down to csv(default) vs tsv. I can't quite manage to track back from the scala parse method to (where I assume) I will be able to set the separator char. -JD java.util.IllegalFormatConversionException: d != java.lang.Double at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) at java.util.Formatter.format(Formatter.java:2520) at java.util.Formatter.format(Formatter.java:2455) at java.lang.String.format(String.java:2925) at water.fvec.Frame.toString(Frame.java:457) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at scala.collection.immutable.NumericRange.foreach(NumericRange.scala:74) at water.api.dsl.Utils$.head(Utils.scala:62) at water.api.dsl.DFrame.toString(H2ODsl.scala:174) at scala.runtime.ScalaRunTime$.scala$runtime$ScalaRunTime$$inner$1(ScalaRunTime.scala:324) at scala.runtime.ScalaRunTime$.stringOf(ScalaRunTime.scala:329) at scala.runtime.ScalaRunTime$.replStringOf(ScalaRunTime.scala:337) at .<init>(<console>:10) at .<clinit>(<console>) at $print(<console>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734) at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983) at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604) at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568) at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:756) at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:801) at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:713) at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:577) at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:584) at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:587) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:878) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:833) at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135) at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:833) at water.api.dsl.ShalalaRepl$.launchRepl(ShalalaRepl.scala:47) at water.api.dsl.ShalalaRepl$.userMain(ShalalaRepl.scala:31) at water.api.dsl.ShalalaRepl.userMain(ShalalaRepl.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at water.Boot.run(Boot.java:304) at water.Boot.boot2(Boot.java:280) at water.Boot.main(Boot.java:136) at water.Boot.main(Boot.java:126) at water.api.dsl.ShalalaRepl$.main(ShalalaRepl.scala:26) at water.api.dsl.ShalalaRepl.main(ShalalaRepl.scala)
    via by Michal Malohlava,
  • update: looks like I was incorrectly using 'c' as a name below (it's reserved). update: initially thought the problem was: The a,b,d,e,f,g things are not created as keys usable between execs. I have to do the a=c(0) thing to make sure it gets created as a key and kept. but apparently it still fails. Are named keys not usable in cbind() ? odd error message though for non-existent variables/keys [2014-05-13 11:11:26.084010] exec_query parameters: {'str': 'a=rep_len(0,100)'} [2014-05-13 11:11:26.084080] Frame return [2014-05-13 11:11:26.129698] exec_query parameters: {'str': 'b=a; d=a; e=a; f=a; g=a;'} [2014-05-13 11:11:26.129771] Frame return [2014-05-13 11:11:26.146396] exec_query parameters: {'str': 'h <- cbind(a, b, c, d, e, f, g)'} [2014-05-13 11:11:26.146496] rjson: { [2014-05-13 11:11:26.155883] "error": "Passed 7 args but expected 1\nh <- cbind(a, b, c, d, e, f, g)\n ^--------------------^\n", [2014-05-13 11:11:26.155883] "response": { [2014-05-13 11:11:26.155883] "h2o": "pytest-kevin-5043", [2014-05-13 11:11:26.155883] "node": "/192.168.1.41:54321", [2014-05-13 11:11:26.155883] "status": "error", [2014-05-13 11:11:26.155883] "time": 5 [2014-05-13 11:11:26.155883] } [2014-05-13 11:11:26.155883] } [2014-05-13 11:11:26.155937] rjson error in exec_query: Passed 7 args but expected 1 [2014-05-13 11:11:26.157337] h <- cbind(a, b, c, d, e, f, g) [2014-05-13 11:11:26.157337] ^--------------------^ [2014-05-13 11:11:26.157337] ERROR [2014-05-13 11:11:26.157377] java.util.IllegalFormatConversionException: e != java.lang.Long [2014-05-13 11:11:26.157639] at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4045) [2014-05-13 11:11:26.158759] at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2761) [2014-05-13 11:11:26.158833] at java.util.Formatter$FormatSpecifier.print(Formatter.java:2708) [2014-05-13 11:11:26.158891] at java.util.Formatter.format(Formatter.java:2488) [2014-05-13 11:11:26.158931] at java.util.Formatter.format(Formatter.java:2423) [2014-05-13 11:11:26.158966] at java.lang.String.format(String.java:2797) [2014-05-13 11:11:26.159003] at water.fvec.Frame.toString(Frame.java:551) [2014-05-13 11:11:26.159042] at water.api.Exec2.serve(Exec2.java:51) [2014-05-13 11:11:26.159076] at water.api.Request.serveGrid(Request.java:140) [2014-05-13 11:11:26.159111] at water.Request2.superServeGrid(Request2.java:478) [2014-05-13 11:11:26.159147] at water.api.Exec2.serveGrid(Exec2.java:77) [2014-05-13 11:11:26.159180] at water.api.Request.serve(Request.java:117) [2014-05-13 11:11:26.159215] at water.api.RequestServer.serve(RequestServer.java:389) [2014-05-13 11:11:26.159251] at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) [2014-05-13 11:11:26.159288] at java.lang.Thread.run(Thread.java:744)
    via by Kevin Normoyle,
  • this seems new. subtract with two data frames? is it thinking the - is part of the frame name (no spaces) exec_query parameters: {'str': 'z.hex=r.hex-r.hex;'} ===== Running test "py/testdir_single_jvm_fvec/test_exec2_unary.py" (6/51) ===== java.util.IllegalFormatConversionException: e != java.lang.Long 03:56:12.173 # Session INFO WATER: at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999) 03:56:12.179 # Session INFO WATER: at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2722) 03:56:12.180 # Session INFO WATER: at java.util.Formatter$FormatSpecifier.print(Formatter.java:2667) 03:56:12.180 # Session INFO WATER: at java.util.Formatter.format(Formatter.java:2433) 03:56:12.181 # Session INFO WATER: at java.util.Formatter.format(Formatter.java:2367) 03:56:12.181 # Session INFO WATER: at java.lang.String.format(String.java:2769) 03:56:12.182 # Session INFO WATER: at water.fvec.Frame.toString(Frame.java:529) 03:56:12.182 # Session INFO WATER: at water.api.Exec2.serve(Exec2.java:50) 03:56:12.183 # Session INFO WATER: at water.api.Request.serveGrid(Request.java:139) 03:56:12.183 # Session INFO WATER: at water.Request2.superServeGrid(Request2.java:478) 03:56:12.184 # Session INFO WATER: at water.api.Exec2.serveGrid(Exec2.java:71) 03:56:12.184 # Session INFO WATER: at water.api.Request.serve(Request.java:116) 03:56:12.185 # Session INFO WATER: at water.api.RequestServer.serve(RequestServer.java:328) 03:56:12.185 # Session INFO WATER: at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) 03:56:12.186 # Session INFO WATER: at java.lang.Thread.run(Thread.java:662)
    via by Kevin Normoyle,
  • Java: String Formatting
    via Stack Overflow by user102817
    ,
  • GitHub comment 40#170362651
    via GitHub by phoenixlzx
    ,
  • {code} INFO: Method: POST , URI: /3/Parse, route: /3/Parse, parms: {number_columns=9, source_frames=["nfs://home3/jenkins/slave_dir_from_mr-0xb1/workspace/h2o_master_DEV_pyunit_small_J6/smalldata/junit/cars_20mpg.csv"], single_quotes=False, column_types=["Enum","Numeric","Numeric","Numeric","Numeric","Numeric","Numeric","Numeric","Numeric"], parse_type=CSV, destination_frame=cars_20mpg.hex, delete_on_done=True, column_names=["name","economy","cylinders","displacement","power","weight","acceleration","year","economy_20mpg"], check_header=1, separator=44, blocking=False, chunk_size=4194304} 01-24 15:34:10.462 172.16.2.180:56793 26601 #26081-17 INFO: Method: POST , URI: /99/Rapids, route: /99/Rapids, parms: {ast=(tmp= py_1 (:= cars_20mpg.hex (as.factor (cols_py cars_20mpg.hex "cylinders")) 2 [])), session_id=_sid_a5c4} 01-24 15:34:10.470 172.16.2.180:56793 26601 #26081-15 INFO: Method: POST , URI: /3/ModelBuilders/drf, route: /3/ModelBuilders/drf, parms: {seed=1234, training_frame=py_1, response_column=cylinders, ignored_columns=["economy_20mpg","name","economy"], fold_assignment=Modulo, nfolds=5} {code} Fails with {code} 01-24 15:34:19.929 172.16.2.180:56793 26601 FJ-2-7 INFO: 2016-01-24 15:34:19 0.007 sec 0 NaN NaN NaN 1.00000 34.53878 0.75342 onExCompletion for hex.tree.SharedTree$ScoreBuildOneTree@69123787 java.util.IllegalFormatConversionException: d != java.lang.Double at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2661) at java.util.Formatter.format(Formatter.java:2433) at java.util.Formatter.format(Formatter.java:2367) at java.lang.String.format(String.java:2769) at hex.tree.DHistogram.toString(DHistogram.java:226) at java.lang.String.valueOf(String.java:2826) at java.lang.StringBuilder.append(StringBuilder.java:115) at hex.tree.DHistogram.bin(DHistogram.java:122) at hex.tree.ScoreBuildHistogram.overAllRows(ScoreBuildHistogram.java:267) at hex.tree.ScoreBuildHistogram.accum_all(ScoreBuildHistogram.java:233) at hex.tree.ScoreBuildHistogram.map(ScoreBuildHistogram.java:108) at water.MRTask.compute2(MRTask.java:613) at water.H2O$H2OCountedCompleter.compute1(H2O.java:1084) at hex.tree.ScoreBuildHistogram$Icer.compute1(ScoreBuildHistogram$Icer.java) at water.H2O$H2OCountedCompleter.compute(H2O.java:1080) at jsr166y.CountedCompleter.exec(CountedCompleter.java:468) at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263) at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974) at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477) at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) {code} So 2 errors at once: out-of-bounds in histogram building that fails to print because of some type mismatch.
    via by Arno Candel,
    • java.util.IllegalFormatConversionException: d != java.lang.Double at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) at java.util.Formatter.format(Formatter.java:2520) at java.util.Formatter.format(Formatter.java:2455) at java.lang.String.format(String.java:2925) at water.fvec.Frame.toString(Frame.java:457) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at water.api.dsl.Utils$$anonfun$head$1.apply(Utils.scala:62) at scala.collection.immutable.NumericRange.foreach(NumericRange.scala:74) at water.api.dsl.Utils$.head(Utils.scala:62) at water.api.dsl.DFrame.toString(H2ODsl.scala:174) at scala.runtime.ScalaRunTime$.scala$runtime$ScalaRunTime$$inner$1(ScalaRunTime.scala:324) at scala.runtime.ScalaRunTime$.stringOf(ScalaRunTime.scala:329) at scala.runtime.ScalaRunTime$.replStringOf(ScalaRunTime.scala:337)

    Users with the same issue

    silexsilex
    2 times, last one,
    slashslash
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    aldrinlealaldrinleal
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    19 more bugmates