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:46:00 UTC
[jira] [Closed] (ARROW-15908) [Python] FlightClient.DoAction raises RPC exception (C# Client <-> Python Flight Server)
[ https://issues.apache.org/jira/browse/ARROW-15908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Dunderdale closed ARROW-15908.
------------------------------------
Resolution: Not A Bug
> [Python] FlightClient.DoAction raises RPC exception (C# Client <-> Python Flight Server)
> ----------------------------------------------------------------------------------------
>
> 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
> Server Packages/Versions:
> Python 3.10.2
> pyarrow 7.0.0
> Client Details:
> C# 9
> Grpc.Net.Client 2.42.0
> Apache.Arrow.Flight 7.0.0
> Reporter: Chris Dunderdale
> Priority: Major
> Labels: C#, Python3
>
> 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 a [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)