krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
830 stars 251 forks source link

I have the same issue any workaround for windows command prompt. #254

Closed agwlprince617 closed 11 months ago

agwlprince617 commented 1 year ago
          I am having issue as well on loading the sample data `air-routes-latest.graphml` tried using `:load` or the function `graph.io(graphml()).readGraph('air-routes.graphml')` here is my exact terminal:
gremlin> :load air-routes.graphml
File not found: "air-routes.graphml"
gremlin> :load ./air-routes.graphml
File not found: "./air-routes.graphml"
gremlin> graph.io(graphml()).readGraph('air-routes.graphml')
air-routes.graphml (No such file or directory)
Type ':help' or ':h' for help.

I also tried using the exact path or using ~ but no luck as well. I used curl to download the file and also tried cloning your repo and use only the sample data air-routes.graphml but still same error.

Edit: I got this working by using this command on the terminal in Ubuntu: ./gremlin.sh -i load-air-routes-graph.groovy but before you execute this command edit the file load-air-routes-graph.groovy replace the path of 'air-routes.graphml' to the absolute path and desired data file e.g. home/user/projects/grem-console/bin/air-routes-latest.graphml

Originally posted by @jcjp in https://github.com/krlawrence/graph/issues/168#issuecomment-632113700

krlawrence commented 12 months ago

Hi @agwlprince617 - somehow I missed this issue. Sorry about that. Are you still having problems? I load the data all the time on Windows, Linux and Mac so I'm keen to understand what is not working here in your case.

krlawrence commented 11 months ago

Please re-open if you are still having the issue.

sivakart commented 2 months ago

graph.io(graphml()).readGraph('D:\Software\tinkerpop\scripts\air-routes.graphml') Adding multiple slashes in case of windows helped.