Unable to connect to the workbench client through python. I've tested multiple installation of Ansys with diffrent issue unable to get it to connect to ansys.
Error:
Ansys.Core.DataSpecs.ValidationException: Unknown argument: EnvironmentPrefix
at Ansys.Core.Commands.CommandSpec.SetArgumentsFromDictionary(Object command, IDictionary2 arguments, IProtectedContext context) at Ansys.Core.Commands.Core.CommandInfo.SetArgsFromDictionary(Object cmd, IDictionary2 args, IProtectedContext context)
--- Ansys.Core.Commands.CommandArgumentException: Unknown argument: EnvironmentPrefix
at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx)
at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value)
at Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.DynamicInstruction5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.CompiledCode.Execute[T](ScriptScope scope) at Ansys.PythonScriptingEngine.PythonScriptingEngine.Execute(String scriptCode) --- Ansys.Core.Scripting.ScriptingException: CommandArgumentException: Unknown argument: EnvironmentPrefix Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Program Files\ANSYS Inc\ANSYS Student\v232\Addins\PythonScriptingEngine\PythonFiles\CommandBindings.py", line 51, in __call__ File "C:\Program Files\ANSYS Inc\ANSYS Student\v232\Addins\PythonScriptingEngine\PythonFiles\CommandBindings.py", line 86, in InvokeAsync ValueError: Unknown argument: EnvironmentPrefix at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx) at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value) at Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction5.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at Microsoft.Scripting.Hosting.CompiledCode.Execute[T](ScriptScope scope)
at Ansys.PythonScriptingEngine.PythonScriptingEngine.Execute(String scriptCode)
I've tried popping the argument from the **kwargs, that does get rid of the popup but the port returns None and times out. (TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType')
π Steps to reproduce
The basic varification of installation doesn't work and creates the error:
from ansys.workbench.core import launch_workbench
workbench = launch_workbench(release="232")
π Before submitting the issue
π Description of the bug
Unable to connect to the workbench client through python. I've tested multiple installation of Ansys with diffrent issue unable to get it to connect to ansys.
Error: Ansys.Core.DataSpecs.ValidationException: Unknown argument: EnvironmentPrefix at Ansys.Core.Commands.CommandSpec.SetArgumentsFromDictionary(Object command, IDictionary
2 arguments, IProtectedContext context) at Ansys.Core.Commands.Core.CommandInfo.SetArgsFromDictionary(Object cmd, IDictionary
2 args, IProtectedContext context) --- Ansys.Core.Commands.CommandArgumentException: Unknown argument: EnvironmentPrefix at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx) at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value) at Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.FuncCallInstruction
6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction
4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.CompiledCode.Execute[T](ScriptScope scope) at Ansys.PythonScriptingEngine.PythonScriptingEngine.Execute(String scriptCode) --- Ansys.Core.Scripting.ScriptingException: CommandArgumentException: Unknown argument: EnvironmentPrefix Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Program Files\ANSYS Inc\ANSYS Student\v232\Addins\PythonScriptingEngine\PythonFiles\CommandBindings.py", line 51, in __call__ File "C:\Program Files\ANSYS Inc\ANSYS Student\v232\Addins\PythonScriptingEngine\PythonFiles\CommandBindings.py", line 86, in InvokeAsync ValueError: Unknown argument: EnvironmentPrefix at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx) at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value) at Microsoft.Scripting.Interpreter.FuncCallInstruction
2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction
5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction
4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.CompiledCode.Execute[T](ScriptScope scope) at Ansys.PythonScriptingEngine.PythonScriptingEngine.Execute(String scriptCode)I've tried popping the argument from the **kwargs, that does get rid of the popup but the port returns None and times out. (TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType')
π Steps to reproduce
The basic varification of installation doesn't work and creates the error:
from ansys.workbench.core import launch_workbench workbench = launch_workbench(release="232")
π» Which operating system are you using?
Windows
π Which ANSYS version are you using?
Ansys 2023 R2 v232
π Which Python version are you using?
3.11
π¦ Installed packages