dotnet `Enumeration has not started. Call MoveNext` if I try to enumerate over a result

I recently try to use gremlin to created a graph and query this graph. Currently I get it working to push data into the graph. 🎉 But now my problem is to get data back from the graph. What is working is something like that:
/// g is <see cref="GraphTraversalSource"/>
var result = g.V().ToList().Select(v => $"Id: {v.Id}; Label: {v.Label};").ToList();
/// g is <see cref="GraphTraversalSource"/>
var result = g.V().ToList().Select(v => $"Id: {v.Id}; Label: {v.Label};").ToList();
This gives me a nice result over my imported data. Here is a short sample of it:
[
"Id: 0; Label: summaries;",
"Id: 128; Label: temps;",
"Id: 2; Label: summaries;",
"Id: 122; Label: temps;",
"Id: 124; Label: temps;",
"Id: 126; Label: temps;"
]
[
"Id: 0; Label: summaries;",
"Id: 128; Label: temps;",
"Id: 2; Label: summaries;",
"Id: 122; Label: temps;",
"Id: 124; Label: temps;",
"Id: 126; Label: temps;"
]
The problem is now if I try to filter the data I get errors, So for example I want to see all the things that have the label summaries I need todo something like that:
var summary = await g.V().Has("label", "summaries").Values<string>("label").Promise(t => t.Next());
var summary = await g.V().Has("label", "summaries").Values<string>("label").Promise(t => t.Next());
The problem is now that I get with this query the following error:
System.InvalidOperationException: Enumeration has not started. Call MoveNext.
at System.SZGenericArrayEnumerator`1.get_Current()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.MoveNextInternal()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.MoveNext()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.Next()
at Program.<>c.<<Main>$>b__0_11#1(ITraversal`2 t)
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.Promise[TReturn](Func`2 callback)
at Program.<>c__DisplayClass0_0.<<<Main>$>b__5>d.MoveNext()
System.InvalidOperationException: Enumeration has not started. Call MoveNext.
at System.SZGenericArrayEnumerator`1.get_Current()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.MoveNextInternal()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.MoveNext()
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.Next()
at Program.<>c.<<Main>$>b__0_11#1(ITraversal`2 t)
at Gremlin.Net.Process.Traversal.DefaultTraversal`2.Promise[TReturn](Func`2 callback)
at Program.<>c__DisplayClass0_0.<<<Main>$>b__5>d.MoveNext()
The stacktrace is a bit shortend so it fits in a post here.
This error is thrown inside the Promise by calling Next. But this error is for just not helpful. I'm also an beginner so I don't know what todo.
Solution:
You're on .NET 8, right? This is unfortunately a known issue which will be fixed in the next release: https://issues.apache.org/jira/browse/TINKERPOP-3029 I'm afraid you'll probably have to use .NET 7 until the next release...
No description
Solution
Florian Hockmann
Florian Hockmann100d ago
You're on .NET 8, right? This is unfortunately a known issue which will be fixed in the next release: https://issues.apache.org/jira/browse/TINKERPOP-3029 I'm afraid you'll probably have to use .NET 7 until the next release
Paule96
Paule96100d ago
yes I'm. Thanks. for the tip. @Florian Hockmann Good that I know now where issues are tracked 😄 I'm searching for the issue tracker for days now ^^ @Florian Hockmann in the Jira Issue it only mentions that it will be fixed for version 3.7.x and 3.6.x. Are there plans to bring this fix to 3.4.x too? The problem is that cloud providers like Azure Cosmos only support the Gremlin.Net package until 3.4.x
Florian Hockmann
Florian Hockmann100d ago
Sorry, but the 3.4 line of releases has been out of support since early 2022, so 2 years already. You'll have to ask the CosmosDB team to support newer versions of TinkerPop Did you try Gremlin.Net 3.7.1 however with Cosmos DB? It's of course not officially supported, but it could still work I guess, at least if you configure Gremlin.Net to use GraphSON instead of GraphBinary
The problem is that cloud providers like
Are there any other cloud providers that only support such old versions? I at least only know of Azure
Paule96
Paule96100d ago
Yes I tried it with the newer version and as far as I tried it out right now it works. But also I'm just completely new to the graph business. So maybe I can write down some experience in 2 to 3 months. I tried your hot fix. So far it works for me with dotnet 8. So I will use for my playground the master branch of thinkerpop.
Want results from more Discord servers?
Add your server
More Posts
I can't create an edge in aws neptune using gremlin. I can create vertices. but not edge.import { driver, process as gremlinProcess, structure } from "gremlin"; async function checkOut() {Iterating over responsesI've got a query akin to this in a python application using `gremlin-python`: ``` t = traversal().wAWS Neptune updating gremlin driver to 3.6.2 introduced many bugs to working queriesAfter updating Amazon Neptune engine version from 1.2.0.2 to 1.2.1.0 and the Gremlin.Net (C# nuget) vertex-label-with-given-name-does-not-existERROR with Janusgraph 0.5.3vertex-label-with-given-name-does-not-exist ERROR with Janusgraph 0.5.3 while adding labels to vertiDocumentation states there should be a mid-traversal .E() step?Just wondering if I'm missing something, or if the docs are mistaken. It's possible to do a mid-travDisabling strategies via string in remote driverIs there a way to disable a strategy in a providers implementation without a reference to the class?LazyBarrierStrategy/NoOpBarrierStep incompatible with path-tracking👋🏻 Hi all! In this JanusGraph post (https://discord.com/channels/981533699378135051/1195313165278Is there a way to store the tinkerpop graph in DynamoDB?AWS provides Neptue graph database but problem with it is that it is not distributed and can't be hoConnection to Azure cosmos db using GoHi All, Asking this as a newbie to Graphs databases in general. I have been trying to connect to an I met a man with seven wives, each of which had seven sacks.I met a man with seven wives, each of which had seven sacks. Now, suppose I have shipping container May I suggest a new topic-channel for us? Like "really-big-data" or "pagination"?Related to https://discord.com/channels/838910279550238720/1100527694342520963/1100853192922759244 aIntegration tests for AWS Neptune DBdo we have any Testcontainers for AWS Neptune for writing integration tests in java applicationsG.V() IDE can't visualize path().by(valueMap()) queryHi @G.V() - Gremlin IDE (Arthur) sorry if this is a duplicate question. I am playing around with G.VBeginner Gremlin QuestionsHello - I am trying to do an Advent of Code challenge as a graph problem to learn some Gremlin, and G.V Graph Playground: Gremlin client@G.V() - Gremlin IDE (Arthur) Quick question: Does G.V graph playground allow adding vertices & edgeSplitting a query with range()I have a Gremlin Query that starts simple (one Label), and then branches out to many different pathsException saving as GryoWhen trying to save as gryo getting the error, Unable to create serializer "org.apache.tinkerpop.shaAWS Neptune: Pong fails and close event not emittedHey guys, long time no see. We have an issue which occurred a few times in the last couple weeks aGremlin upsert on a vertex but preventing updates on a particular property on a vertex during upsertHi, Following is an upsert query on a vertex with label 'stvertex' and I am required to initialize aDoes graph notebook still work after changes to serializers?I am trying to use the graph-notebook project, my project previously worked. I updated Aerospike gra