Trying to load air-routes.graphml yields no such file or directory
graph.io(graphml()).readGraph('~/Downloads/air-routes.graphml')
yields ~/Downloads/air-routes.graphml (No such file or directory)
~ % curl https://raw.githubusercontent.com/krlawrence/graph/refs/heads/master/sample-data/air-routes.graphml -o air-routes.graphml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7641k 100 7641k 0 0 18.6M 0 --:--:-- --:--:-- --:--:-- 18.9M
~ % head air-routes.graphml
<?xml version='1.0' ?>
<!-- ******************************************************************************* -->
<!-- Sample file containing selected air routes between selected airports. -->
<!-- Intended for learning purposes only and not for travel planning! -->
<!-- -->
<!-- Author: Kelvin R. Lawrence. -->
<!-- Graph version : 0.77 , 2017-Oct-06 -->
<!-- -->
<!-- Please send details of errors in the graph or suggestions to: -->
<!-- e-mail: [email protected] , twitter: @gfxman -->
~ % curl https://raw.githubusercontent.com/krlawrence/graph/refs/heads/master/sample-data/air-routes.graphml -o air-routes.graphml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7641k 100 7641k 0 0 18.6M 0 --:--:-- --:--:-- --:--:-- 18.9M
~ % head air-routes.graphml
<?xml version='1.0' ?>
<!-- ******************************************************************************* -->
<!-- Sample file containing selected air routes between selected airports. -->
<!-- Intended for learning purposes only and not for travel planning! -->
<!-- -->
<!-- Author: Kelvin R. Lawrence. -->
<!-- Graph version : 0.77 , 2017-Oct-06 -->
<!-- -->
<!-- Please send details of errors in the graph or suggestions to: -->
<!-- e-mail: [email protected] , twitter: @gfxman -->
6 Replies
~ % gremlin
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@1f52eb6f
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin>
graph.io(graphml()).readGraph('air-routes.graphml')
air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]
~ % gremlin
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@1f52eb6f
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin>
graph.io(graphml()).readGraph('air-routes.graphml')
air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]
I wanted to use the air routes database to write up a question that I need to ask, but I can't seem to follow the instructions found in Practical Gremlin and at https://github.com/krlawrence/graph/blob/master/sample-data/load-air-routes-graph.groovy#L13 to load the air-routes database
GitHub
graph/sample-data/load-air-routes-graph.groovy at master · krlawren...
Practical Gremlin - An Apache TinkerPop Tutorial. Contribute to krlawrence/graph development by creating an account on GitHub.
Can you try to use an absolute file path instead of relative?
~ % gremlin
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@1f52eb6f
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin> graph.io(graphml()).readGraph('~/air-routes.graphml')
~/air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin> :exit
~ % head ~/air-routes.graphml
<?xml version='1.0' ?>
<!-- ******************************************************************************* -->
<!-- Sample file containing selected air routes between selected airports. -->
<!-- Intended for learning purposes only and not for travel planning! -->
<!-- -->
<!-- Author: Kelvin R. Lawrence. -->
<!-- Graph version : 0.77 , 2017-Oct-06 -->
<!-- -->
<!-- Please send details of errors in the graph or suggestions to: -->
<!-- e-mail: [email protected] , twitter: @gfxman -->
~ % gremlin
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@1f52eb6f
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin> graph.io(graphml()).readGraph('~/air-routes.graphml')
~/air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin> :exit
~ % head ~/air-routes.graphml
<?xml version='1.0' ?>
<!-- ******************************************************************************* -->
<!-- Sample file containing selected air routes between selected airports. -->
<!-- Intended for learning purposes only and not for travel planning! -->
<!-- -->
<!-- Author: Kelvin R. Lawrence. -->
<!-- Graph version : 0.77 , 2017-Oct-06 -->
<!-- -->
<!-- Please send details of errors in the graph or suggestions to: -->
<!-- e-mail: [email protected] , twitter: @gfxman -->
~/air-routes.graphml
What version of TinkerPop is this for? 3.7?
Using master branch I was able to see the error you had when using an incorrect file path but then the console succeeded after I modified the file path to point to the file I downloaded from Kelvin's repository:
If you obtained the air routes file from the same repository that you linked I noticed the file is called
Connected to the target VM, address: '127.0.0.1:53213', transport: 'socket'
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.tinkergraph
plugin activated: tinkerpop.sugar
plugin activated: tinkerpop.credentials
plugin activated: tinkerpop.remote
plugin activated: tinkerpop.utilities
gremlin> conf = new BaseConfiguration()
conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
graph = TinkerGraph.open(conf)conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@6f9e08d4
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin> graph.io(graphml()).readGraph('/mydata/air-routes.graphml')
graph.io(graphml()).readGraph('/mydata/air-routes.graphml')
/mydata/air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]n
n
gremlin> graph.io(graphml()).readGraph('/Users/x/Downloads/air-routes-latest.graphml')
graph.io(graphml()).readGraph('/Users/x/Downloads/air-routes-latest.graphml')
==>null
gremlin> g=graph.traversal()
:set max-iteration 1000 g=graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:3749 edges:57645], standard]
gremlin> :set max-iteration 1000
gremlin> g.V()
g.V()
==>v[0]
==>v[1]
==>v[2]
==>v[3]
==>v[4]
==>v[5]
==>v[6]
==>v[7]
==>v[8]
==>v[9]
==>v[10]
Connected to the target VM, address: '127.0.0.1:53213', transport: 'socket'
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.tinkergraph
plugin activated: tinkerpop.sugar
plugin activated: tinkerpop.credentials
plugin activated: tinkerpop.remote
plugin activated: tinkerpop.utilities
gremlin> conf = new BaseConfiguration()
conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
graph = TinkerGraph.open(conf)conf = new BaseConfiguration()
==>org.apache.commons.configuration2.BaseConfiguration@6f9e08d4
gremlin> conf.setProperty("gremlin.tinkergraph.vertexIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.edgeIdManager","LONG")
==>null
gremlin> conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager","LONG")
==>null
gremlin> graph = TinkerGraph.open(conf)
==>tinkergraph[vertices:0 edges:0]
gremlin> graph.io(graphml()).readGraph('/mydata/air-routes.graphml')
graph.io(graphml()).readGraph('/mydata/air-routes.graphml')
/mydata/air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.
Display stack trace? [yN]n
n
gremlin> graph.io(graphml()).readGraph('/Users/x/Downloads/air-routes-latest.graphml')
graph.io(graphml()).readGraph('/Users/x/Downloads/air-routes-latest.graphml')
==>null
gremlin> g=graph.traversal()
:set max-iteration 1000 g=graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:3749 edges:57645], standard]
gremlin> :set max-iteration 1000
gremlin> g.V()
g.V()
==>v[0]
==>v[1]
==>v[2]
==>v[3]
==>v[4]
==>v[5]
==>v[6]
==>v[7]
==>v[8]
==>v[9]
==>v[10]
air-routes-latest.graphml
not air-routes.graphml
, could that be the problem?