浏览代码

check for potentially bad env variables (#2540)

/develop-gpu-test
GitHub 5 年前
当前提交
2a5da881
共有 1 个文件被更改,包括 13 次插入3 次删除
  1. 16
      UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs

16
UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs


using System.Collections.Generic;
using System.Linq;
using System;
using UnityEngine;
namespace MLAgents

}
catch
{
throw new UnityAgentsException(
"The Communicator was unable to connect. Please make sure the External " +
"process is ready to accept communication with Unity.");
var exceptionMessage = "The Communicator was unable to connect. Please make sure the External " +
"process is ready to accept communication with Unity.";
// Check for common error condition and add details to the exception message.
var httpProxy = Environment.GetEnvironmentVariable("HTTP_PROXY");
var httpsProxy = Environment.GetEnvironmentVariable("HTTPS_PROXY");
if (httpProxy != null || httpsProxy != null)
{
exceptionMessage += " Try removing HTTP_PROXY and HTTPS_PROXY from the" +
"environment variables and try again.";
}
throw new UnityAgentsException(exceptionMessage);
}
var firstRlInput = input.RlInput;

正在加载...
取消
保存