Unable to open a PyMAPDL instance
clatapie opened this issue Β· comments
Camille commented
π€ Before submitting the issue
- I have visited the Troubleshooting section.
- I have searched among the existing issues.
- I am using a Python virtual environment.
- I am using the latest version of PyMAPDL and its dependencies (fully updated virtual environment). You can update them using
pip install --upgrade --upgrade-strategy eager ansys-mapdl-core
in your activated virtual environment.
π Description of the bug
PyMAPDL is not launching on my laptop as shown bellow:
(.venv) PS D:\repos\pyansys\pymapdl_1> pymapdl start
There is an existing MAPDL instance at: 127.0.0.1:50052
Traceback (most recent call last):
File "C:\Users\clatapie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\clatapie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\repos\pyansys\pymapdl_1\.venv\Scripts\pymapdl.exe\__main__.py", line 7, in <module>
File "D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "D:\repos\pyansys\pymapdl_1\src\ansys\mapdl\core\cli.py", line 489, in start
if len(out) == 3:
TypeError: object of type 'NoneType' has no len()
(.venv) PS D:\repos\pyansys\pymapdl_1> pymapdl stop
ERROR: No Ansys instances running on port 50052 have been found
(.venv) PS D:\repos\pyansys\pymapdl_1> pymapdl list
Name Is Instance Status gRPC port PID
------ ------------- -------- ----------- -----
Important note
MAPDL 2023 R2 is installed on my laptop and runs fine when opening it manually.
π΅οΈ Steps To Reproduce
The log will automatically be formatted as Python code! No need to type backticks.
pymapdl start
π» Which Operating System are you using?
Windows
π Which Python version are you using?
3.10
π PyMAPDL Report
Show the Report!
(.venv) PS D:\repos\pyansys\pymapdl_1> python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"
D:\repos\pyansys\pymapdl_1\.venv\lib\site-packages\pyvista\utilities\__init__.py:69: PyVistaDeprecationWarning: The `pyvista.utilities` module has been
deprecated. `GPUInfo` is now imported as: `from pyvista.report import GPUInfo`.
warnings.warn(
-------------------------------------------------------------------------------
PyAnsys Software and Environment Report
-------------------------------------------------------------------------------
Date: Tue Mar 19 17:18:15 2024 Romance Standard Time
OS : Windows
CPU(s) : 24
Machine : AMD64
Architecture : 64bit
RAM : 63.7 GiB
Environment : Python
GPU Vendor : Intel
GPU Renderer : Intel(R) UHD Graphics 770
GPU Version : 4.5.0 - Build 31.0.101.4255
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64
bit (AMD64)]
ansys.mapdl.core : 0.69.dev0
numpy : 1.25.2
platformdirs : 3.10.0
scipy : 1.12.0
grpc : 1.62.1
ansys.api.mapdl.v0 : Version unknown
ansys.mapdl.reader : 0.53.0
google.protobuf : 3.20.3
matplotlib : 3.8.3
pyvista : 0.43.4
pyiges : 0.3.1
tqdm : 4.66.1
ansys_sphinx_theme : 0.14.1
ansys.dpf.core : 0.10.1
ansys.dpf.post : Module not found
ansys.dpf.gate : Version unknown
ansys.fluent.core : Module not found
ansys.fluent.visualization : Module not found
ansys.fluent.parametric : Module not found
ansys.grantami.bomanalytics : Module not found
ansys.openapi.common : Module not found
ansys.platform.instancemanagement : 1.1.2
ansys.seascape : Module not found
ansys.tools.report : 0.7.0
ansys.tools.versioning : 0.4.0
pyaedt : Module not found
appdirs : 1.4.4
-------------------------------------------------------------------------------
Ansys Environment Report
-------------------------------------------------------------------------------
Ansys Installation
******************
No Ansys installations provided
Ansys Environment Variables
***************************
ANSYS221_DIR C:\Program Files\ANSYS Inc\v221\ANSYS
ANSYS222_DIR C:\Program Files\ANSYS Inc\v222\ANSYS
ANSYS231_DIR C:\Program Files\ANSYS Inc\v231\ANSYS
ANSYS232_DIR C:\Program Files\ANSYS Inc\v232\ANSYS
ANSYSEM_ROOT232 C:\Program Files\AnsysEM\v232\Win64
ANSYSLIC_DIR C:\Program Files\ANSYS Inc\Shared Files\Licensing
ANSYS_DPF_ACCEPT_LA Y
ANSYS_LOCAL True
AWP_LOCALE222 en-us
AWP_ROOT221 C:\Program Files\ANSYS Inc\v221
AWP_ROOT222 C:\Program Files\ANSYS Inc\v222
AWP_ROOT231 C:\Program Files\ANSYS Inc\v231
AWP_ROOT232 C:\Program Files\ANSYS Inc\v232
CADOE_LIBDIR221 C:\Program Files\ANSYS Inc\v221\CommonFiles\Language\en-us
CADOE_LIBDIR222 C:\Program Files\ANSYS Inc\v222\CommonFiles\Language\en-us
CADOE_LIBDIR231 C:\Program Files\ANSYS Inc\v231\CommonFiles\Language\en-us
CADOE_LIBDIR232 C:\Program Files\ANSYS Inc\v232\CommonFiles\Language\en-us
SIMPLORER_HOME C:\Program Files\AnsysEM\v232\Win64
SIWAVE_INSTALL_DIR C:\Program Files\AnsysEM\v232\Win64
π Installed packages
Show the installed packages!
# PASTE HERE THE OUTPUT OF `python -m pip freeze` here
π Logger output file
Show the logger output file.
# PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE.
German commented
This due to a conflict between trying pymapdl start
while having PYMAPDL_START_INSTANCE
equal False
.
(.venv) ubuntu@ip-10-231-106-87:~/pymapdl$ export PYMAPDL_START_INSTANCE=False
(.venv) ubuntu@ip-10-231-106-87:~/pymapdl$ pymapdl start
There is an existing MAPDL instance at: 127.0.0.1:50052
Traceback (most recent call last):
File "/home/ubuntu/pymapdl/.venv/bin/pymapdl", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/pymapdl/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/pymapdl/.venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ubuntu/pymapdl/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/pymapdl/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/pymapdl/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/pymapdl/src/ansys/mapdl/core/cli.py", line 489, in start
if len(out) == 3:
TypeError: object of type 'NoneType' has no len()