Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Bug Unexpected exception while trying to iniitialize communication:

Discussion in 'ML-Agents' started by billubccogs300, Oct 22, 2022.

  1. billubccogs300


    Sep 12, 2022

    I'm trying to train a game in the Unity Editor for Mac 2020.3.40f1, using ML Agents 2.0.1 and I got this message. I am doing this on a Macbook Version 10:13.6.

    I noticed a similar post on a Windows box [ ] that narrowed down the problem to a missing dll MSVCP140.DLL.

    Anyway, here is the stack trace. Hope you can help, and thanks in advance:

    Unexpected exception when trying to initialize communication: System.IO.IOException: Error loading native library "/Users/userb/Documents/COGS 300/lab5-connectionism-main/Library/PackageCache/"
    at Grpc.Core.Internal.UnmanagedLibrary..ctor (System.String[] libraryPathAlternatives) [0x00063] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Internal.NativeExtension.Load () [0x000d7] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Internal.NativeExtension..ctor () [0x00006] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Internal.NativeExtension.Get () [0x00022] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Internal.NativeMethods.Get () [0x00000] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.GrpcEnvironment.GrpcNativeInit () [0x00000] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.GrpcEnvironment..ctor () [0x0001e] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.GrpcEnvironment.AddRef () [0x00028] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Channel..ctor (System.String target, Grpc.Core.ChannelCredentials credentials, System.Collections.Generic.IEnumerable`1[T] options) [0x00051] in <2f154ad39ec14cfea604815989d96352>:0
    at Grpc.Core.Channel..ctor (System.String target, Grpc.Core.ChannelCredentials credentials) [0x00000] in <2f154ad39ec14cfea604815989d96352>:0
    at Unity.MLAgents.RpcCommunicator.Initialize (System.Int32 port, Unity.MLAgents.CommunicatorObjects.UnityOutputProto unityOutput, Unity.MLAgents.CommunicatorObjects.UnityInputProto& unityInput) [0x00007] in /Users/userb/Documents/COGS 300/lab5-connectionism-main/Library/PackageCache/
    at Unity.MLAgents.RpcCommunicator.Initialize (Unity.MLAgents.CommunicatorInitParameters initParameters, Unity.MLAgents.UnityRLInitParameters& initParametersOut) [0x0003b] in /Users/userb/Documents/COGS 300/lab5-connectionism-main/Library/PackageCache/
    UnityEngine.Debug:Log (object)
    Unity.MLAgents.RpcCommunicator:Initialize (Unity.MLAgents.CommunicatorInitParameters,Unity.MLAgents.UnityRLInitParameters&) (at Library/PackageCache/
    Unity.MLAgents.Academy:InitializeEnvironment () (at Library/PackageCache/
    Unity.MLAgents.Academy:LazyInitialize () (at Library/PackageCache/
    Unity.MLAgents.Academy:.ctor () (at Library/PackageCache/
    Unity.MLAgents.Academy/<>c:<.cctor>b__83_0 () (at Library/PackageCache/
    System.Lazy`1<Unity.MLAgents.Academy>:get_Value ()
    Unity.MLAgents.Academy:get_Instance () (at Library/PackageCache/
    Unity.MLAgents.DecisionRequester:Awake () (at Library/PackageCache/