[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16327116#comment-16327116 ] ASF GitHub Bot commented on TINKERPOP-1860: --- Github user asfgit closed the pull request at: https://github.com/apache/tinkerpop/pull/774 > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325671#comment-16325671 ] ASF GitHub Bot commented on TINKERPOP-1860: --- Github user FlorianHockmann commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/774#discussion_r161403447 --- Diff: gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs --- @@ -236,6 +237,11 @@ private static object ToLambda(string stringLambda, string graphName) throw new IgnoreException(IgnoreReason.LambdaNotSupported); } +private static object ToT(string enumName, string graphName) +{ +return Enum.Parse(typeof(T), TraversalParser.GetCsharpName(enumName)); --- End diff -- Shouldn't this simply return the string representation of the `enum` for GraphSON 2.0? Stephen mentioned in TINKERPOP-1866: > When that did happen in GraphSON 2.0, `T` values were simply converted to string. > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16324367#comment-16324367 ] ASF GitHub Bot commented on TINKERPOP-1860: --- Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/774 VOTE: +1 > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16324365#comment-16324365 ] ASF GitHub Bot commented on TINKERPOP-1860: --- Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/773 VOTE: +1 > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16318618#comment-16318618 ] ASF GitHub Bot commented on TINKERPOP-1860: --- GitHub user spmallette opened a pull request: https://github.com/apache/tinkerpop/pull/774 TINKERPOP-1860 valueMap(true) support/testing https://issues.apache.org/jira/browse/TINKERPOP-1860 This is the PR for master that is kin to #773 - it required additional changes to support GraphSON 3.0 as 3.0 is capable of returning complex objects for keys. All tests pass with `docker/build.sh -t -n -i` VOTE +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1860-master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/774.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #774 commit 0b94b5072a297ab883d66804c48d8a224012a90f Author: Stephen MalletteDate: 2017-12-29T13:02:55Z TINKERPOP-1860 Added tests for valueMap(true) variations Note that with GraphSON 2.0 we get back string representations of T.id and T.label. That may change for GraphSON 3.0 on the 3.3.x line of code. commit 13f1adbd4a012f413adaa584530a78c258e2d92d Author: Stephen Mallette Date: 2018-01-08T13:07:21Z Merge branch 'TINKERPOP-1860' into TINKERPOP-1860-master Conflicts: gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyValueMapTest.groovy gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ValueMapTest.java commit 6f1b8be8ea28908de60ee4df4c201d15b755ab4a Author: Stephen Mallette Date: 2018-01-08T14:19:00Z TINKERPOP-1860 Added deserializer for T in gremlin-python This allowed valueMap(true) to start working. commit b7ed09907a1c47b4c7fee49d4d75da1aa5c71efc Author: Jorge Bay Gondra Date: 2018-01-08T17:17:27Z Gremlin.Net support traversal tokens in the test suite commit bd1466b51d715e4badacd7cc7a56d5d3e53112d9 Author: Jorge Bay Gondra Date: 2018-01-08T17:59:12Z Ignore g_V_valueMapXtrueX and g_V_valueMapXtrue_name_ageX on Gremlin.Net > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16318368#comment-16318368 ] ASF GitHub Bot commented on TINKERPOP-1860: --- Github user robertdale commented on the issue: https://github.com/apache/tinkerpop/pull/773 VOTE +1 > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16318324#comment-16318324 ] ASF GitHub Bot commented on TINKERPOP-1860: --- GitHub user spmallette opened a pull request: https://github.com/apache/tinkerpop/pull/773 TINKERPOP-1860 Added tests for valueMap(true) variations https://issues.apache.org/jira/browse/TINKERPOP-1860 Somewhat surprised we didn't have tests for this variation of `valueMap()`. All tests pass with `docker/build.sh -t -n -i` VOTE +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1860 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/773.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #773 commit caede9c8ca5cad07b947a53b38a9cc145500f6bf Author: Stephen MalletteDate: 2017-12-29T13:02:55Z TINKERPOP-1860 Added tests for valueMap(true) variations Note that with GraphSON 2.0 we get back string representations of T.id and T.label. That may change for GraphSON 3.0 on the 3.3.x line of code. > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1860) valueMap(True) result in error in gremlin-python
[ https://issues.apache.org/jira/browse/TINKERPOP-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16306290#comment-16306290 ] stephen mallette commented on TINKERPOP-1860: - Thanks for pointing this out. Upon investigation I'm seeing that we didn't have a great body of tests for {{valueMap(true)}} - i'm adding some as part of this fix. I notice that you are using GraphSON 3.0 which I had trouble configuring with our tests - see TINKERPOP-1844 - i suspect the problem will get fixed as part of that issue, so for now, I guess, this issue depends on that one. fwiw, GraphSON 2.0 seems to work just fine with {{valueMap(true)}} the additional tests I added in my branch of tp32/master both work. > valueMap(True) result in error in gremlin-python > > > Key: TINKERPOP-1860 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1860 > Project: TinkerPop > Issue Type: Bug > Components: python >Affects Versions: 3.3.0 > Environment: Windows 10 > jvm 1.8, python 3.5 > tinkerpop 3.3.0 >Reporter: yokota masanori >Priority: Minor > > I use [True] value as a argument of valueMap() step. And it result in error > as below. > (This error didn't occur in Groovy Query and return list of Value Map with id > and label) > // Python > graph = Graph() > g = > graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g')) > g.V().valueMap(True).toList() > => > TypeError > > 1 g.V().valueMap(True).toList() > ... > ~\site-packages\gremlin_python\structure\io\graphsonV3d0.py in > objectify(cls, l, reader) > 453 x = 0 > 454 while x < len(l): > --> 455 new_dict[reader.toObject(l[x])] = reader.toObject(l[x > + 1]) > 456 x = x + 2 > 457 return new_dict > TypeError: unhashable type: 'dict' -- This message was sent by Atlassian JIRA (v6.4.14#64029)