How to get unstuck from poorly formatted query in Gremlin console

41 views
Skip to first unread message

Paul Jackson

unread,
Dec 2, 2016, 1:51:21 PM12/2/16
to Gremlin-users
On occasion (rare occasions!), I'll miss a paren or something and I'll get the console into a state I can't recover from:

Meaning to enter, say:
gremlin> g.V(1).as("a").both().map(group().by(label).
......1> by(unfold())).as("b").select("a","b")
==>[a:v[1],b:[software:v[3]]]
==>[a:v[1],b:[person:v[2]]]
==>[a:v[1],b:[person:v[4]]]

I might instead accidentally type:
gremlin> g.V(1).as("a").both().map(group().by(label)).
......1> by(unfold()).as("b").select("a","b")
org.apache.tinkerpop.gremlin.process.traversal.step.map.TraversalMapStep cannot be cast to org.apache.tinkerpop.gremlin.process.traversal.step.ByModulating
Type ':help' or ':h' for help.
Display stack trace? [yN]
......1> )
groovysh_parse: 3: unexpected token: ) @ line 3, column 1.
   )
   ^

1 error
Type ':help' or ':h' for help.
Display stack trace? [yN]
......1>
......1>
......1> ^D
......1> ^Z

D:\apache-tinkerpop-gremlin-console-3.2.3\bin>

Is there a trick for getting back to a normal prompt from this point?

Thanks,
-Paul

Daniel Kuppitz

unread,
Dec 2, 2016, 1:53:07 PM12/2/16
to gremli...@googlegroups.com
:c

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/fa4dd2ec-3203-4b57-aba6-698ea526eb16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Mallette

unread,
Dec 2, 2016, 1:55:04 PM12/2/16
to Gremlin-users
gremlin> :clear

--

Paul Jackson

unread,
Dec 2, 2016, 1:56:31 PM12/2/16
to Gremlin-users
THANK YOU!!!
gremlin> :clear

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Robert Dale

unread,
Dec 2, 2016, 1:58:04 PM12/2/16
to gremli...@googlegroups.com
Daniel, I think that was mistaken for an emoji.

:c

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seVXknk_8zqk4Mo%3D6TYXbkpW0aUxNL9vDr1Cq97Ofr5emQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
--
Robert Dale

Daniel Kuppitz

unread,
Dec 2, 2016, 3:06:45 PM12/2/16
to gremli...@googlegroups.com
Probably, yea. Still funny to give a 2-character answer :).

Cheers,
Daniel


:c

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
--
Robert Dale

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CABed_4rvxkZ7pCiDWXHh-C-nii0XhSq46qnYpsBRSZ4eUNR%2B2A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages