You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Chris Dunderdale (Jira)" <ji...@apache.org> on 2022/03/10 16:14:00 UTC
[jira] [Created] (ARROW-15908) FlightClient.DoAction raises RPC exception (C# Client <-> Python Server Flight)
Chris Dunderdale created ARROW-15908:
----------------------------------------
Summary: FlightClient.DoAction raises RPC exception (C# Client <-> Python Server Flight)
Key: ARROW-15908
URL: https://issues.apache.org/jira/browse/ARROW-15908
Project: Apache Arrow
Issue Type: Bug
Components: C#, Python
Affects Versions: 7.0.0
Environment: Rider 2021.3
Windows
Installed Nuget Packages:
Grpc.Net.Client 2.42.0
Apache.Arrow.Flight
Reporter: Chris Dunderdale
Hi all
I'm busy testing arrow flight and I'm noticing that requesting actions from C# to Python is raising the following exception.
{code:java}
Unhandled exception. System.AggregateException: One or more errors occurred. (Status(StatusCode="Unknown", Detail="a bytes-like object is required, not 'str'. Detail: Python exception: TypeError"))
---> Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="a bytes-like object is required, not 'str'. Detail: Python exception: TypeError")
at Grpc.Net.Client.Internal.HttpContentClientStreamReader`2.MoveNextCore(CancellationToken cancellationToken)
at Apache.Arrow.Flight.Internal.StreamReader`2.MoveNext(CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Test.Program.Main(String[] args) in C:\Users\Chris\Test\Program.cs:line 33
{code}
I've built [C# client|https://github.com/apache/arrow/tree/master/csharp/examples/FlightClientExample] and [Python server|https://github.com/apache/arrow/tree/master/python/examples/flight] which I've obtained from the Arrow Github repo.
I've trimmed down the C# client to just the following code:
{code:java}
using System;
using Grpc.Net.Client;
using Apache.Arrow.Flight.Client;
using Apache.Arrow.Flight;
namespace Test
{
class Program
{
static void Main(string[] args)
{
var address = "http://localhost:5005";
Console.WriteLine($"Connecting to: {address}");
var channel = GrpcChannel.ForAddress(address);
var client = new FlightClient(channel);
var shutdownAction = client.DoAction(new FlightAction("shutdown")); shutdownAction.ResponseStream.MoveNext(default).Wait();
}
}
} {code}
I've noted that the original code on the github repo example uses await (which no longer seems to work) and if I leave the final line out, the do_action() method is never called server-side.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)