You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug originates at StackOverflow: [https://stackoverflow.com/questions/59309659/as-h2o-fails-when-there-is-a-dollar-sign-cannot-determine-file-type|https://stackoverflow.com/questions/59309659/as-h2o-fails-when-there-is-a-dollar-sign-cannot-determine-file-type]
Pavel Pscheidl commented: The problem seems to be easily solvable:
If the parser is in state of POSSIBLE_CURRENCY and the parser hits a quote, instead of jumping into the COND_QUOTE state without incrementing offset and reading new character, it will do exactly that - increment the offset and read new character. After that action, it will finally reach the COND_QUOTE state, but with different character evaluated - and will end up in endless loop.
Solution seems to be to break into MAIN_LOOP and prevent offset incrementation, instead of
{{if (c == quotes) { state = COND_QUOTE; break MAIN_LOOP;}}}
instead of
{{if (c == quotes) { state = COND_QUOTE; break;}}}
Jira Issue: PUBDEV-7149
Assignee: Pavel Pscheidl
Reporter: Pavel Pscheidl
State: Closed
Fix Version: 3.28.0.2
Attachments: N/A
Development PRs: Available
This bug originates at StackOverflow: [https://stackoverflow.com/questions/59309659/as-h2o-fails-when-there-is-a-dollar-sign-cannot-determine-file-type|https://stackoverflow.com/questions/59309659/as-h2o-fails-when-there-is-a-dollar-sign-cannot-determine-file-type]
To quote StackOverflow question:
Here is a reproducible example:
{noformat}library(h2o)
h2o.init()
tmp <- data.frame(text = "$", stringsAsFactors = FALSE)
data <- as.h2o(tmp){noformat}
And the error:
{noformat}ERROR: Unexpected HTTP Status code: 412 Precondition Failed (url = http://localhost:54321/3/ParseSetup)
water.exceptions.H2OIllegalArgumentException
[1] "water.exceptions.H2OIllegalArgumentException: Cannot determine file type. for /tmp/RtmpseoDZt/file36123d495362.csv_sid_ae2a_2"
[2] " water.api.ParseSetupHandler.guessSetup(ParseSetupHandler.java:46)"
[3] " sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
[4] " sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
[5] " sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
[6] " java.lang.reflect.Method.invoke(Method.java:498)"
[7] " water.api.Handler.handle(Handler.java:60)"
[8] " water.api.RequestServer.serve(RequestServer.java:462)"
[9] " water.api.RequestServer.doGeneric(RequestServer.java:295)"
[10] " water.api.RequestServer.doPost(RequestServer.java:221)"
[11] " javax.servlet.http.HttpServlet.service(HttpServlet.java:755)"
[12] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[13] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[14] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)"
[15] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[16] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)"
[17] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[18] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[19] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[20] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[21] " water.webserver.jetty8.Jetty8ServerAdapter$LoginHandler.handle(Jetty8ServerAdapter.java:119)"
[22] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[23] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[24] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[25] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[26] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[27] " org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)"
[28] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)"
[29] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)"
[30] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)"
[31] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[32] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[33] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[34] " org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)"
[35] " java.lang.Thread.run(Thread.java:748)"
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
Cannot determine file type. for /tmp/RtmpseoDZt/file36123d495362.csv_sid_ae2a_2{noformat}
The text was updated successfully, but these errors were encountered: