You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (Jira)" <ji...@apache.org> on 2019/09/16 11:00:09 UTC

[jira] [Commented] (TINKERPOP-2293) Gremlin-Python example not working

    [ https://issues.apache.org/jira/browse/TINKERPOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930428#comment-16930428 ] 

stephen mallette commented on TINKERPOP-2293:
---------------------------------------------

While I'm not sure of your specific problem, I provided some feedback here:

https://stackoverflow.com/a/57955186/1831717

In regards to your suggestions:

> add a complete example for python3 including requirements.txt, python code install script and description how to configure and start server

Our [reference documentation for Python|http://tinkerpop.apache.org/docs/3.4.3/reference/#gremlin-python] makes the assumption that the reader has a general understanding of the TinkerPop environment and that they have at least read through the introduction and specifically the [Connecting Gremlin|http://tinkerpop.apache.org/docs/3.4.3/reference/#connecting-gremlin] section which shows all the ways to connect to a TinkerPop-enabled graph in each Gremlin Language Variant (including Python). The Gremlin Python [section||http://tinkerpop.apache.org/docs/3.4.3/reference/#gremlin-python]  links back to that in reference (as to all GLVs. There is also plenty of documentation for [server configuration|http://tinkerpop.apache.org/docs/3.4.3/reference/#gremlin-server]. 

I'm saying all that not to make it sound like the documentation is perfect, but I'm want to be sure that you're oriented to all of that we have related to gremlinpython and Gremlin Server and how the docs all fit together because for all the links you provided, you didn't include any that linked to any of that. If you have suggestions for improvements, please put them in the context of what is our official documentation.

One thing that I did learn from what you wrote here - we should update the [pypi page|https://pypi.org/project/gremlinpython/] project description to note that Gremlin Server is required. I will definitely get that done and do the same for the javascript and .NET.

> fix the gremlin-server-modern-py.yaml

I started Gremlin Server with this config file and didn't have a problem.

> the "-i" optione mentioned in this file does not seem to exist any more.

yes, that option was replaced years ago - it was replaced by "install" discussed [here|http://tinkerpop.apache.org/docs/3.4.3/reference/#_configuring_2] 

> Gremlin-Python example not working
> ----------------------------------
>
>                 Key: TINKERPOP-2293
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2293
>             Project: TinkerPop
>          Issue Type: Bug
>            Reporter: Wolfgang Fahl
>            Priority: Major
>
> see [https://stackoverflow.com/questions/57936915/how-do-i-get-gremlin-python-with-gremlin-server-3-4-3-to-work]
>  
> Steps to reproduce:
> So i wanted to tryout gremlin-python. I found [https://pypi.org/project/gremlinpython/] and happily added
>  
> {{gremlinpython}}
> to my requirements.txt
>  
> {{sudo -H pip install -r requirements.txt}}
> ran successfully- great. Let's find some python code to play with .
> [https://gist.githubusercontent.com/okram/f193d5616563a69ad5714a42c504276f/raw/b8075410e400e18f18360015945f3760d99d044a/gremlin-python-play.py]
> has it.
> Oh - I need a server ...
> Let's download it
> [http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/tinkerpop/3.4.3/apache-tinkerpop-gremlin-server-3.4.3-bin.zip]
> unzip it and create a starter file for it as outlined in the example above:
>  
> {{gspath=$HOME/Downloads/apache-tinkerpop-gremlin-server-3.4.3#$gspath/bin/gremlin-server.sh install org.apache.tinkerpop gremlin-python 3.4.3$gspath/bin/gremlin-server.sh $gspath/conf/gremlin-server-modern-py.yaml}}
> It doesn't work - get a 599 timeout from tornado.
> Look at:
> [Why can't I connect to Gremlin-Server?|https://stackoverflow.com/questions/41783800/why-cant-i-connect-to-gremlin-server]
> Try hints e.g. using 0.0.0.0 as host
> Check the startup.
> Oops - there is an error:
> ServerGremlinExecutor - Could not initialize gremlin-python GremlinScriptEngine as init script could not be evaluated
> java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: gremlin-python is not an available GremlinScriptEngine
>  at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
>  
> Same for gremlin-jython.
>  
> sudo port install jython 
>  
> does not change the situation.
>  
> At least there are some things that would improve the situation:
>  
>  * add a complete example for python3 including requirements.txt, python code install script and description how to configure and start server
> -  fix the gremlin-server-modern-py.yaml
> the "-i" optione mentioned in this file does not seem to exist any more.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)