Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Unable to run ML-Agents at my Win11 PC due to gRPC exception

Discussion in 'ML-Agents' started by t_sugita, Apr 14, 2023.

  1. t_sugita

    t_sugita

    Joined:
    Nov 7, 2022
    Posts:
    2
    Hi everyone!

    I'm starting to learn about ML-Agents, and want to run the 3DBall example.
    At first, I setup both environments(Windows 11 Pro), unity side(ML Agents Extensions) and Python side(ml-agents & ml-agents-env).
    Next, I loaded a 3D Ball project for Unity, and did some setup.
    Finally, I ran mlagents-learn and push Unity run button.

    At this time, ML-Agents Extention returned the "Unexpected gRPC exception".(Details are given at the end of the text.)
    I did the same in a Windows 10 environment, but it didn't occurred this error.

    I hope to resolve this problem, and want to run a ML-Agents Extention in my Win11 PC.
    I would appreciate it a lot if anyone could help. Thanks!

    • Environment
      • PC
        • OS: Windows 11 Pro(Version 22H2, OS build:22621.1413)
        • CPU:Intel Core i9-13900KF
        • GPU:NVIDIA GeForce RTX 4090
        • RAM:128GB
      • Sortware (I tried some versions)
        • Unity 2020.3 / 2021.3 / 2022.2
        • ML-Agents(from GitHub) release 19/14/20 & latest main branch.
    -------------------------------------------------------------------------------------------------------------------
    Unexpected gRPC exception when trying to initialize communication: Grpc.Core.RpcException: Status(StatusCode=Cancelled, Detail="Received http2 header with status: 404")
    at Grpc.Core.Internal.AsyncCall`2[TRequest,TResponse].UnaryCall (TRequest msg) [0x00172] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.CallInvocationDetails`2[TRequest,TResponse] call, TRequest req) [0x00006] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method`2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00009] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Interceptors.InterceptingCallInvoker.<BlockingUnaryCall>b__3_0[TRequest,TResponse] (TRequest req, Grpc.Core.Interceptors.ClientInterceptorContext`2[TRequest,TResponse] ctx) [0x0001b] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.ClientBase+ClientBaseConfiguration+ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse] (TRequest request, Grpc.Core.Interceptors.ClientInterceptorContext`2[TRequest,TResponse] context, Grpc.Core.Interceptors.Interceptor+BlockingUnaryCallContinuation`2[TRequest,TResponse] continuation) [0x00009] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method`2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00010] in <2f154ad39ec14cfea604815989d96352>:0
    at Unity.MLAgents.CommunicatorObjects.UnityToExternalProto+UnityToExternalProtoClient.Exchange (Unity.MLAgents.CommunicatorObjects.UnityMessageProto request, Grpc.Core.CallOptions options) [0x00000] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Grpc\CommunicatorObjects\UnityToExternalGrpc.cs:90
    at Unity.MLAgents.CommunicatorObjects.UnityToExternalProto+UnityToExternalProtoClient.Exchange (Unity.MLAgents.CommunicatorObjects.UnityMessageProto request, Grpc.Core.Metadata headers, System.Nullable`1[T] deadline, System.Threading.CancellationToken cancellationToken) [0x00000] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Grpc\CommunicatorObjects\UnityToExternalGrpc.cs:80
    at Unity.MLAgents.RpcCommunicator.Initialize (System.Int32 port, Unity.MLAgents.CommunicatorObjects.UnityOutputProto unityOutput, Unity.MLAgents.CommunicatorObjects.UnityInputProto& unityInput) [0x00038] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Communicator\RpcCommunicator.cs:227
    at Unity.MLAgents.RpcCommunicator.Initialize (Unity.MLAgents.CommunicatorInitParameters initParameters, Unity.MLAgents.UnityRLInitParameters& initParametersOut) [0x0003b] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Communicator\RpcCommunicator.cs:112
    UnityEngine.Debug:Log (object)
    Unity.MLAgents.RpcCommunicator:Initialize (Unity.MLAgents.CommunicatorInitParameters,Unity.MLAgents.UnityRLInitParameters&) (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:135)
    Unity.MLAgents.Academy:InitializeEnvironment () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:452)
    Unity.MLAgents.Academy:LazyInitialize () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:286)
    Unity.MLAgents.Academy:.ctor () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:255)
    Unity.MLAgents.Academy/<>c:<.cctor>b__86_0 () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:117)
    System.Lazy`1<Unity.MLAgents.Academy>:get_Value ()
    Unity.MLAgents.Academy:get_Instance () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:132)
    Unity.MLAgents.DecisionRequester:Awake () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/DecisionRequester.cs:57)
    -------------------------------------------------------------------------------------------------------------------
     

    Attached Files:

  2. t_sugita

    t_sugita

    Joined:
    Nov 7, 2022
    Posts:
    2
    Hello everyone,

    Thank you for taking the time to read our post.

    We understand that our situation may be rare, and unfortunately we have not received a response to our question.
    As a result, we would like to ask our question on the Unity-Technologies GitHub page (https://github.com/Unity-Technologies/ml-agents).

    Best regards.