ansys / pyworkbench

PyWorkbench
http://workbench.docs.pyansys.com/
MIT License
3 stars 4 forks source link

Issue with launching pyworkbench "'GuiOperation Processing commandline argument' Unknown argument: EnvironmentPrefix" #92

Closed a-abir closed 5 months ago

a-abir commented 5 months ago

πŸ” 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. image

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")

πŸ’» 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

about-time==4.2.1
alive-progress==3.1.5
ansys-api-fluent==0.3.24
ansys-api-mechanical==0.1.2
ansys-api-platform-instancemanagement==1.1.0
ansys-api-workbench==0.2.0
ansys-fluent-core==0.20.1
ansys-mechanical-core==0.10.11
ansys-mechanical-env==0.1.6
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc3
ansys-tools-path==0.6.0
ansys-units==0.3.2
ansys-workbench-core==0.4.0
appdirs==1.4.4
asttokens==2.4.1
beartype==0.17.2
certifi==2024.6.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
clr-loader==0.2.6
colorama==0.4.6
comm==0.2.2
debugpy==1.8.1
decorator==5.1.1
docker==6.1.3
executing==2.0.1
grapheme==0.6.0
grpcio==1.64.1
grpcio-health-checking==1.62.2
idna==3.7
importlib_metadata==7.1.0
ipykernel==6.29.4
ipython==8.25.0
jedi==0.19.1
jupyter_client==8.6.2
jupyter_core==5.7.2
lxml==4.9.4
matplotlib-inline==0.1.7
nest-asyncio==1.6.0
numpy==1.26.4
packaging==24.1
pandas==1.5.3
parso==0.8.4
platformdirs==3.11.0
prompt_toolkit==3.0.47
protobuf==4.25.3
psutil==5.9.8
pure-eval==0.2.2
pycparser==2.22
Pygments==2.18.0
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32==306
PyYAML==6.0.1
pyzmq==26.0.3
requests==2.32.3
six==1.16.0
stack-data==0.6.3
tornado==6.4.1
tqdm==4.66.4
traitlets==5.14.3
typing_extensions==4.12.2
urllib3==2.2.1
wcwidth==0.2.13
websocket-client==1.8.0
WMI==1.5.1
zipp==3.19.2
franknli commented 5 months ago

@a-abir Release 23.2 does not contain all functions of WB gRPC service. So the error is expected. I am closing this issue. Thanks!