ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
428 stars 120 forks source link

Error in running pymapdl #1330

Closed FiniteShekhar closed 2 years ago

FiniteShekhar commented 2 years ago

Before submitting the issue

Description of the bug

I have used the following command snippet to run pymapdl:

  from ansys.mapdl.core import launch_mapdl
  mapdl = launch_mapdl()

but it is showing an entry point error every time and it does not start.

Steps To Reproduce

--------------------------------------------------------------------------------------------------------------------------------------------
MapdlDidNotStart                          Traceback (most recent call last)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1513         elif mode == "grpc":
-> 1514             port, actual_run_location = launch_grpc(
   1515                 port=port,

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_grpc(exec_file, jobname, nproc, ram, run_location, port, ip, additional_switches, override, timeout, verbose, add_env_vars, replace_env_vars, **kwargs)
    534     if not has_ans:
--> 535         raise MapdlDidNotStart(
    536             f"MAPDL failed to start (No err file generated in '{run_location}')"

MapdlDidNotStart: MAPDL failed to start (No err file generated in 'C:\Users\Shekhar Srivastava\AppData\Local\Temp\ansys_hftskucqvi')

During handling of the above exception, another exception occurred:

LicenseServerConnectionError              Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_15300/2042919200.py in <module>
      1 from ansys.mapdl.core import launch_mapdl
----> 2 mapdl = launch_mapdl()

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1536         # to the license check
   1537         if license_server_check:
-> 1538             lic_check.check()
   1539             # pass
   1540         raise exception

C:\Anaconda\lib\site-packages\ansys\mapdl\core\licensing.py in check(self)
    443             return True
    444         elif self._license_file_success is False:
--> 445             raise LicenseServerConnectionError("\n".join(self._license_file_msg))
    446 
    447         if self._license_checkout_success:

LicenseServerConnectionError: Exceeded 10 seconds while waiting for C:\Users\Shekhar Srivastava\AppData\Local\Temp\.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out to exist.

Which Operating System are you using?

Windows

Which Python version are you using?

3.9

Installed packages

alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work
anaconda-client @ file:///C:/ci/anaconda-client_1635342725944/work
anaconda-navigator==2.2.0
anaconda-project @ file:///tmp/build/80754af9/anaconda-project_1626085644852/work
ansys-api-mapdl==0.5.1
ansys-api-mapdl-v0==0.4.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-mapdl-core==0.63.1
ansys-mapdl-reader==0.51.14
ansys-platform-instancemanagement==1.0.2
anyio @ file:///C:/ci/anyio_1620153135622/work/dist
appdirs==1.4.4
apptools @ file:///home/conda/feedstock_root/build_artifacts/apptools_1610582543268/work
argh==0.26.2
argon2-cffi @ file:///C:/ci/argon2-cffi_1613037869401/work
arrow @ file:///C:/ci/arrow_1617738834352/work
asn1crypto @ file:///tmp/build/80754af9/asn1crypto_1596577642040/work
astroid @ file:///C:/ci/astroid_1628063282661/work
astropy @ file:///C:/ci/astropy_1629829318700/work
async-generator @ file:///home/ktietz/src/ci/async_generator_1611927993394/work
atomicwrites==1.4.0
attrs @ file:///tmp/build/80754af9/attrs_1620827162558/work
autopep8 @ file:///tmp/build/80754af9/autopep8_1620866417880/work
Babel @ file:///tmp/build/80754af9/babel_1620871417480/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work
backports.shutil-get-terminal-size @ file:///tmp/build/80754af9/backports.shutil_get_terminal_size_1608222128777/work
backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work
backports.weakref==1.0.post1
bcrypt @ file:///C:/ci/bcrypt_1607022693089/work
beautifulsoup4 @ file:///tmp/build/80754af9/beautifulsoup4_1631874778482/work
binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work
bitarray @ file:///C:/ci/bitarray_1629133068652/work
bkcharts==0.2
black==19.10b0
bleach @ file:///tmp/build/80754af9/bleach_1628110601003/work
bokeh @ file:///C:/ci/bokeh_1635306491714/work
boto==2.49.0
Bottleneck @ file:///C:/ci/bottleneck_1607557040328/work
brotlipy==0.7.0
cached-property @ file:///tmp/build/80754af9/cached-property_1600785575025/work
cachetools==5.2.0
certifi==2022.5.18.1
cffi @ file:///C:/ci/cffi_1625831756778/work
cftime @ file:///D:/bld/cftime_1649637025912/work
chardet @ file:///C:/ci/chardet_1607706937985/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
click==8.0.3
cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1632508026186/work
clyent==1.2.2
colorama @ file:///tmp/build/80754af9/colorama_1607707115595/work
comtypes==1.1.10
conda==4.13.0
conda-build==3.21.9
conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work
conda-pack @ file:///tmp/build/80754af9/conda-pack_1611163042455/work
conda-package-handling @ file:///C:/ci/conda-package-handling_1649106011304/work
conda-repo-cli @ file:///tmp/build/80754af9/conda-repo-cli_1620168426516/work
conda-token @ file:///tmp/build/80754af9/conda-token_1620076980546/work
conda-verify==3.4.2
configobj==5.0.6
contextlib2 @ file:///Users/ktietz/demo/mc3/conda-bld/contextlib2_1630668244042/work
cookiecutter @ file:///tmp/build/80754af9/cookiecutter_1617748928239/work
cryptography @ file:///C:/ci/cryptography_1633520531101/work
cycler==0.10.0
Cython @ file:///C:/ci/cython_1636018292912/work
cytoolz==0.11.0
daal4py==2021.3.0
dask==2021.10.0
debugpy @ file:///C:/ci/debugpy_1629222819322/work
decorator @ file:///tmp/build/80754af9/decorator_1632776554403/work
defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work
diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work
distributed @ file:///C:/ci/distributed_1635968318313/work
docutils @ file:///C:/ci/docutils_1620828264669/work
entrypoints==0.3
envisage @ file:///home/conda/feedstock_root/build_artifacts/envisage_1623953337124/work
et-xmlfile==1.1.0
fastcache @ file:///C:/ci/fastcache_1607571310570/work
filelock @ file:///tmp/build/80754af9/filelock_1635402558181/work
flake8 @ file:///tmp/build/80754af9/flake8_1620776156532/work
Flask @ file:///home/ktietz/src/ci/flask_1611932660458/work
fonttools==4.25.0
fsspec @ file:///tmp/build/80754af9/fsspec_1636116461911/work
future @ file:///C:/ci/future_1607568713721/work
geomdl==5.3.1
gevent @ file:///C:/ci/gevent_1628273776273/work
glob2 @ file:///home/linux1/recipes/ci/glob2_1610991677669/work
google-api-core==2.8.2
google-api-python-client==2.55.0
google-auth==2.10.0
google-auth-httplib2==0.1.0
googleapis-common-protos==1.56.3
greenlet @ file:///C:/ci/greenlet_1628888275363/work
grpcio==1.47.0
h5py @ file:///C:/ci/h5py_1622088609188/work
HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work
html5lib @ file:///Users/ktietz/demo/mc3/conda-bld/html5lib_1629144453894/work
httplib2==0.20.4
idna @ file:///tmp/build/80754af9/idna_1622654382723/work
imagecodecs @ file:///C:/ci/imagecodecs_1635511087451/work
imageio @ file:///tmp/build/80754af9/imageio_1617700267927/work
imagesize @ file:///Users/ktietz/demo/mc3/conda-bld/imagesize_1628863108022/work
importlib-metadata @ file:///C:/ci/importlib-metadata_1631916826748/work
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1652715758048/work
inflection==0.5.1
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work
ipykernel @ file:///C:/ci/ipykernel_1633545585502/work/dist/ipykernel-6.4.1-py3-none-any.whl
ipython @ file:///C:/ci/ipython_1635944283918/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1634143127070/work
isort @ file:///tmp/build/80754af9/isort_1628603791788/work
itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work
jdcal @ file:///Users/ktietz/demo/mc3/conda-bld/jdcal_1630584345063/work
jedi @ file:///C:/ci/jedi_1611341083684/work
Jinja2 @ file:///tmp/build/80754af9/jinja2_1612213139570/work
jinja2-time @ file:///tmp/build/80754af9/jinja2-time_1617751524098/work
joblib @ file:///tmp/build/80754af9/joblib_1635411271373/work
json5 @ file:///tmp/build/80754af9/json5_1624432770122/work
jsonschema @ file:///Users/ktietz/demo/mc3/conda-bld/jsonschema_1630511932244/work
jupyter @ file:///C:/ci/jupyter_1607685287094/work
jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1616770841739/work
jupyter-console @ file:///tmp/build/80754af9/jupyter_console_1616615302928/work
jupyter-core @ file:///C:/ci/jupyter_core_1633420716440/work
jupyter-server @ file:///C:/ci/jupyter_server_1616084298419/work
jupyterlab @ file:///tmp/build/80754af9/jupyterlab_1635799997693/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1633419203660/work
jupyterlab-widgets @ file:///tmp/build/80754af9/jupyterlab_widgets_1609884341231/work
keyring @ file:///C:/ci/keyring_1629321702436/work
kiwisolver @ file:///C:/ci/kiwisolver_1612282555033/work
lazy-object-proxy @ file:///C:/ci/lazy-object-proxy_1616529288960/work
libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work
llvmlite==0.37.0
locket==0.2.1
loguru @ file:///D:/bld/loguru_1649442981921/work
lxml @ file:///C:/ci/lxml_1616443418777/work
MarkupSafe @ file:///C:/ci/markupsafe_1607027406824/work
matplotlib @ file:///C:/ci/matplotlib-suite_1634667159685/work
matplotlib-inline @ file:///tmp/build/80754af9/matplotlib-inline_1628242447089/work
mayavi @ file:///D:/bld/mayavi_1633958507764/work
mccabe==0.6.1
menuinst @ file:///C:/ci/menuinst_1631733438520/work
meshio @ file:///home/conda/feedstock_root/build_artifacts/meshio_1622837851801/work
mistune @ file:///C:/ci/mistune_1607359457024/work
mkl-fft==1.3.1
mkl-random @ file:///C:/ci/mkl_random_1626186184308/work
mkl-service==2.4.0
mock @ file:///tmp/build/80754af9/mock_1607622725907/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1635423142362/work
mpmath==1.2.1
msgpack @ file:///C:/ci/msgpack-python_1612287350784/work
multipledispatch @ file:///C:/ci/multipledispatch_1607574329826/work
munkres==1.1.4
mypy-extensions==0.4.3
navigator-updater==0.2.1
nbclassic @ file:///tmp/build/80754af9/nbclassic_1616085367084/work
nbclient @ file:///tmp/build/80754af9/nbclient_1614364831625/work
nbconvert @ file:///C:/ci/nbconvert_1624479160025/work
nbformat @ file:///tmp/build/80754af9/nbformat_1617383369282/work
nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1613680548246/work
netCDF4 @ file:///D:/bld/netcdf4_1630448156695/work
networkx @ file:///tmp/build/80754af9/networkx_1633639043937/work
nltk==3.6.5
nose @ file:///tmp/build/80754af9/nose_1606773131901/work
notebook @ file:///C:/ci/notebook_1635393701545/work
numba @ file:///C:/ci/numba_1635186062888/work
numexpr @ file:///C:/ci/numexpr_1618856728739/work
numpy @ file:///C:/ci/numpy_and_numpy_base_1626271900803/work
numpydoc @ file:///tmp/build/80754af9/numpydoc_1605117425582/work
olefile @ file:///Users/ktietz/demo/mc3/conda-bld/olefile_1629805411829/work
openpyxl @ file:///tmp/build/80754af9/openpyxl_1632777717936/work
packaging @ file:///tmp/build/80754af9/packaging_1625611678980/work
pandas @ file:///C:/ci/pandas_1635506685681/work
pandocfilters @ file:///C:/ci/pandocfilters_1605114832805/work
paramiko @ file:///tmp/build/80754af9/paramiko_1598886428689/work
parso @ file:///tmp/build/80754af9/parso_1617223946239/work
partd @ file:///tmp/build/80754af9/partd_1618000087440/work
path @ file:///C:/ci/path_1624287837534/work
pathlib2 @ file:///C:/ci/pathlib2_1625585796814/work
pathspec==0.7.0
patsy==0.5.2
pep8==1.7.1
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
Pillow==8.4.0
pkginfo==1.7.1
pluggy @ file:///C:/ci/pluggy_1615976440052/work
ply==3.11
poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work
prometheus-client @ file:///tmp/build/80754af9/prometheus_client_1623189609245/work
prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1633440160888/work
protobuf==3.20.1
protoc-gen-swagger==0.1.0
psutil @ file:///C:/ci/psutil_1612298199233/work
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
py @ file:///tmp/build/80754af9/py_1607971587848/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle @ file:///tmp/build/80754af9/pycodestyle_1615748559966/work
pycosat==0.6.3
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
pycurl==7.44.1
pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1621600989141/work
pyerfa @ file:///C:/ci/pyerfa_1621560974055/work
pyface @ file:///home/conda/feedstock_root/build_artifacts/pyface_1647442605190/work
pyflakes @ file:///tmp/build/80754af9/pyflakes_1617200973297/work
Pygments @ file:///tmp/build/80754af9/pygments_1629234116488/work
pyiges==0.2.1
PyJWT @ file:///C:/ci/pyjwt_1619682721924/work
pylint @ file:///C:/ci/pylint_1627536884966/work
pyls-spyder==0.4.0
PyNaCl @ file:///C:/ci/pynacl_1607612759007/work
pyodbc===4.0.0-unsupported
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1635333100036/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
Pypubsub==4.0.3
pyreadline==2.1
pyrsistent @ file:///C:/ci/pyrsistent_1636093225342/work
PySocks @ file:///C:/ci/pysocks_1605307512533/work
pytest==6.2.4
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
python-lsp-black @ file:///tmp/build/80754af9/python-lsp-black_1634232156041/work
python-lsp-jsonrpc==1.0.0
python-lsp-server==1.2.4
python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work
pytz==2021.3
pyvista==0.34.2
PyWavelets @ file:///C:/ci/pywavelets_1607645631519/work
pywin32==228
pywin32-ctypes @ file:///C:/ci/pywin32-ctypes_1607553594546/work
pywinpty @ file:///C:/ci/pywinpty_1607419945780/work
PyYAML==6.0
pyzmq @ file:///C:/ci/pyzmq_1628276105793/work
QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work
qstylizer @ file:///tmp/build/80754af9/qstylizer_1617713584600/work/dist/qstylizer-0.1.10-py2.py3-none-any.whl
QtAwesome @ file:///tmp/build/80754af9/qtawesome_1615991616277/work
qtconsole @ file:///tmp/build/80754af9/qtconsole_1632739723211/work
QtPy @ file:///tmp/build/80754af9/qtpy_1629397026935/work
regex @ file:///C:/ci/regex_1628063427816/work
requests @ file:///tmp/build/80754af9/requests_1629994808627/work
rope @ file:///tmp/build/80754af9/rope_1623703006312/work
rsa==4.9
Rtree @ file:///C:/ci/rtree_1618421015405/work
ruamel-yaml-conda @ file:///C:/ci/ruamel_yaml_1616016898638/work
scikit-image==0.18.3
scikit-learn @ file:///C:/ci/scikit-learn_1622739499047/work
scikit-learn-intelex==2021.20210714.120553
scipy @ file:///C:/ci/scipy_1630606917240/work
scooby==0.5.12
seaborn @ file:///tmp/build/80754af9/seaborn_1629307859561/work
Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work
sfepy @ file:///D:/bld/sfepy_1648709544875/work
simplegeneric==0.8.1
singledispatch @ file:///tmp/build/80754af9/singledispatch_1629321204894/work
sip==4.19.13
six @ file:///tmp/build/80754af9/six_1623709665295/work
sniffio @ file:///C:/ci/sniffio_1614030527509/work
snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1611258885636/work
sortedcollections @ file:///tmp/build/80754af9/sortedcollections_1611172717284/work
sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work
soupsieve @ file:///tmp/build/80754af9/soupsieve_1616183228191/work
Sphinx==4.2.0
sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work
sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work
sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work
sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work
sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work
sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work
sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1597081412696/work
spyder @ file:///C:/ci/spyder_1636480369575/work
spyder-kernels @ file:///C:/ci/spyder-kernels_1634237096710/work
SQLAlchemy @ file:///C:/ci/sqlalchemy_1626948551162/work
statsmodels==0.12.2
sympy @ file:///C:/ci/sympy_1635219088507/work
tables==3.6.1
TBB==0.2
tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work
terminado==0.9.4
testpath @ file:///tmp/build/80754af9/testpath_1624638946665/work
text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work
textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work
threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work
three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work
tifffile @ file:///tmp/build/80754af9/tifffile_1627275862826/work
tinycss @ file:///tmp/build/80754af9/tinycss_1617713798712/work
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
toolz @ file:///home/linux1/recipes/ci/toolz_1610987900194/work
tornado @ file:///C:/ci/tornado_1606924294691/work
tqdm @ file:///tmp/build/80754af9/tqdm_1635330843403/work
traitlets @ file:///tmp/build/80754af9/traitlets_1632522747050/work
traits @ file:///D:/bld/traits_1649413145645/work
traitsui @ file:///home/conda/feedstock_root/build_artifacts/traitsui_1647398005419/work
typed-ast @ file:///C:/ci/typed-ast_1624953797214/work
typing-extensions @ file:///tmp/build/80754af9/typing_extensions_1631814937681/work
ujson @ file:///C:/ci/ujson_1611259568517/work
unicodecsv==0.14.1
Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work
uritemplate==4.1.1
urllib3==1.26.7
vtk===-PKG-VERSION
watchdog @ file:///C:/ci/watchdog_1624955113064/work
wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work
webencodings==0.5.1
Werkzeug @ file:///tmp/build/80754af9/werkzeug_1635505089296/work
whichcraft @ file:///tmp/build/80754af9/whichcraft_1617751293875/work
widgetsnbextension @ file:///C:/ci/widgetsnbextension_1607531582688/work
win-inet-pton @ file:///C:/ci/win_inet_pton_1605306162074/work
win-unicode-console==0.5
win32-setctime @ file:///home/conda/feedstock_root/build_artifacts/win32_setctime_1642883564726/work
wincertstore==0.2
wrapt @ file:///C:/ci/wrapt_1607574570428/work
wxPython==4.1.1
xlrd @ file:///tmp/build/80754af9/xlrd_1608072521494/work
XlsxWriter @ file:///tmp/build/80754af9/xlsxwriter_1628603415431/work
xlwings==0.24.9
xlwt==1.3.0
yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work
zict==2.0.0
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
zope.event==4.5.0
zope.interface @ file:///C:/ci/zope.interface_1625036252485/work
Note: you may need to restart the kernel to use updated packages.
germa89 commented 2 years ago

Hi @FiniteShekhar

It seems you have a problem with the license:

LicenseServerConnectionError: Exceeded 10 seconds while waiting for C:\Users\Shekhar Srivastava\AppData\Local\Temp\.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out to exist.

Can you check you can run MAPDL using the Mechanical Launcher?

FiniteShekhar commented 2 years ago

Hello Thanks for your reply.

I have installed Ansys student. Also, I have checked and the mapdl is working perfectly fine.

I don't know why there is a license error.

On Tue, Aug 9, 2022, 6:04 PM German @.***> wrote:

Hi @FiniteShekhar https://github.com/FiniteShekhar

It seems you have a problem with the license:

LicenseServerConnectionError: Exceeded 10 seconds while waiting for C:\Users\Shekhar Srivastava\AppData\Local\Temp.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out to exist.

Can you check you can run MAPDL using the Mechanical Launcher?

— Reply to this email directly, view it on GitHub https://github.com/pyansys/pymapdl/issues/1330#issuecomment-1209324449, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2NEPW7Z7KKPPJXLTQUHPZ3VYJF7BANCNFSM557UHG2A . You are receiving this because you were mentioned.Message ID: @.***>

germa89 commented 2 years ago

Can you post here the result of the following python code:

from ansys.mapdl.core import Report
print(Report())

Also, can you try to run the following code in a terminal/windows shell:

& 'C:\Program Files\ANSYS Inc\v212\ansys\bin\winx64\ANSYS212.exe' -grpc

or in Linux:

/ansys_inc/v212/ansys/bin/ANSYS212.exe -grpc

Replace the path with your ANSYS installation path.

FiniteShekhar commented 2 years ago

Here it is:

PyMAPDL Software and Environment Report

Packages Requirements


Core packages

ansys.mapdl.core : 0.63.1 numpy : 1.20.3 appdirs : 1.4.4 scipy : 1.7.1 grpc : Package not found ansys.api.mapdl.v0 : 0.4.1 ansys.mapdl.reader : 0.51.14 google.protobuf : Package not found

Optional packages

matplotlib : 3.4.3 pyvista : 0.34.2 pyiges : 0.2.1 tqdm : 4.62.3

Ansys Installation


Unable to locate any Ansys installations

Ansys Environment Variables


ANSYS222_DIR C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS ANSYSLIC_DIR C:\Program Files\ANSYS Inc\Shared Files\licensing ANSYSLMD_LICENSE_FILE C:\Program Files\ANSYS Inc\Shared Files\licensing\license_files\ansyslmd.lic ANSYS_SYSDIR winx64 ANSYS_SYSDIR32 win32 AWP_ROOT222 C:\Program Files\ANSYS Inc\ANSYS Student\v222 CADOE_LIBDIR222 C:\Program Files\ANSYS Inc\ANSYS Student\v222\CommonFiles\Language\en-us

germa89 commented 2 years ago

OK. Can you try the following?

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe")

print(mapdl.prep7())
FiniteShekhar commented 2 years ago

By inputting error above command snippet, same error is occurring.

---------------------------------------------------------------------------
MapdlDidNotStart                          Traceback (most recent call last)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1513         elif mode == "grpc":
-> 1514             port, actual_run_location = launch_grpc(
   1515                 port=port,

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_grpc(exec_file, jobname, nproc, ram, run_location, port, ip, additional_switches, override, timeout, verbose, add_env_vars, replace_env_vars, **kwargs)
    534     if not has_ans:
--> 535         raise MapdlDidNotStart(
    536             f"MAPDL failed to start (No err file generated in '{run_location}')"

MapdlDidNotStart: MAPDL failed to start (No err file generated in 'C:\Users\Shekhar Srivastava\AppData\Local\Temp\ansys_bahhhhudgb')

During handling of the above exception, another exception occurred:

LicenseServerConnectionError              Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11492/1219766555.py in <module>
      1 from ansys.mapdl.core import launch_mapdl
      2 
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe")
      4 
      5 print(mapdl.prep7())

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1536         # to the license check
   1537         if license_server_check:
-> 1538             lic_check.check()
   1539             # pass
   1540         raise exception

C:\Anaconda\lib\site-packages\ansys\mapdl\core\licensing.py in check(self)
    443             return True
    444         elif self._license_file_success is False:
--> 445             raise LicenseServerConnectionError("\n".join(self._license_file_msg))
    446 
    447         if self._license_checkout_success:

LicenseServerConnectionError: Exceeded timeout of 108.0 seconds while examining:
C:\Users\Shekhar Srivastava\AppData\Local\Temp\.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out
germa89 commented 2 years ago

Mmhh... It seems a problem with the MPI.

Could you try:

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")

print(mapdl.prep7())
FiniteShekhar commented 2 years ago

New error:

ValueError                                Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11492/965426865.py in <module>
      1 from ansys.mapdl.core import launch_mapdl
      2 
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")
      4 
      5 print(mapdl.prep7())

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1538             lic_check.check()
   1539             # pass
-> 1540         raise exception
   1541 
   1542     return mapdl

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1520                 **start_parm,
   1521             )
-> 1522             mapdl = MapdlGrpc(
   1523                 ip=ip,
   1524                 port=port,

C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in __init__(self, ip, port, timeout, loglevel, log_file, cleanup_on_exit, log_apdl, set_no_abort, remove_temp_files, print_com, channel, remote_instance, **start_parm)
    300         self._port = port
    301         self._ip = ip
--> 302         super().__init__(
    303             loglevel=loglevel,
    304             log_apdl=log_apdl,

C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl.py in __init__(self, loglevel, use_vtk, log_apdl, log_file, local, print_com, **start_parm)
    199         self._log.debug("Logging set to %s", loglevel)
    200 
--> 201         from ansys.mapdl.core.parameters import Parameters
    202 
    203         self._parameters = Parameters(self)

C:\Anaconda\lib\site-packages\ansys\mapdl\core\parameters.py in <module>
      4 
      5 try:
----> 6     from ansys.mapdl.reader._reader import write_array
      7 
      8     _HAS_READER = True

C:\Anaconda\lib\site-packages\ansys\mapdl\reader\__init__.py in <module>
      6 
      7 from ansys.mapdl.reader._version import __version__
----> 8 from ansys.mapdl.reader.archive import (Archive, write_cmblock, write_nblock,
      9                                         save_as_archive)
     10 from ansys.mapdl.reader.cell_quality import quality

C:\Anaconda\lib\site-packages\ansys\mapdl\reader\archive.py in <module>
     18 import pyvista as pv
     19 
---> 20 from ansys.mapdl.reader import _reader, _archive
     21 from ansys.mapdl.reader.misc import vtk_cell_info, chunks
     22 from ansys.mapdl.reader.mesh import Mesh

ansys\mapdl\reader\cython\_reader.pyx in init ansys.mapdl.reader._reader()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
germa89 commented 2 years ago

I see you are using an old version of Reader.

Can you upgrade the reader package (ansys-mapdl-reader)??

pip install ansys-mapdl-reader -U
FiniteShekhar commented 2 years ago

Did it. What should i do now?

Requirement already satisfied: ansys-mapdl-reader in c:\anaconda\lib\site-packages (0.51.14) Collecting ansys-mapdl-reader Downloading ansys_mapdl_reader-0.51.15-cp39-cp39-win_amd64.whl (1.1 MB) ---------------------------------------- 1.1/1.1 MB 2.3 MB/s eta 0:00:00 Requirement already satisfied: pyvista>=0.32.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (0.34.2) Requirement already satisfied: matplotlib>=3.0.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (3.4.3) Requirement already satisfied: tqdm>=4.45.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (4.62.3) Requirement already satisfied: numpy>=1.16.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (1.20.3) Requirement already satisfied: appdirs>=1.4.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (1.4.4) Requirement already satisfied: pillow>=6.2.0 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (8.4.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (1.3.1) Requirement already satisfied: python-dateutil>=2.7 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (2.8.2) Requirement already satisfied: pyparsing>=2.2.1 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (3.0.4) Requirement already satisfied: cycler>=0.10 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (0.10.0) Requirement already satisfied: vtk in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (-PKG-VERSION) Requirement already satisfied: scooby>=0.5.1 in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (0.5.12) Requirement already satisfied: imageio in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (2.9.0) Requirement already satisfied: colorama in c:\anaconda\lib\site-packages (from tqdm>=4.45.0->ansys-mapdl-reader) (0.4.4) Requirement already satisfied: six in c:\anaconda\lib\site-packages (from cycler>=0.10->matplotlib>=3.0.0->ansys-mapdl-reader) (1.16.0) Installing collected packages: ansys-mapdl-reader Attempting uninstall: ansys-mapdl-reader Found existing installation: ansys-mapdl-reader 0.51.14 Uninstalling ansys-mapdl-reader-0.51.14: Successfully uninstalled ansys-mapdl-reader-0.51.14 Successfully installed ansys-mapdl-reader-0.51.15 Note: you may need to restart the kernel to use updated packages.

germa89 commented 2 years ago

doesn't it work now?

FiniteShekhar commented 2 years ago

No it does not work.

germa89 commented 2 years ago

which error now? the same about reader?

germa89 commented 2 years ago

Can you try also?

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp",
license_server_check = False
)

print(mapdl.prep7())
FiniteShekhar commented 2 years ago

Now this is the error:

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1521             )
-> 1522             mapdl = MapdlGrpc(
   1523                 ip=ip,

C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in __init__(self, ip, port, timeout, loglevel, log_file, cleanup_on_exit, log_apdl, set_no_abort, remove_temp_files, print_com, channel, remote_instance, **start_parm)
    350         # connect and validate to the channel
--> 351         self._multi_connect(timeout=timeout)
    352

C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in _multi_connect(self, n_attempts, timeout, set_no_abort)
    412         if not connected:
--> 413             raise IOError(
    414                 f"Unable to connect to MAPDL gRPC instance at {self._channel_str}"

OSError: Unable to connect to MAPDL gRPC instance at 127.0.0.1:50053

During handling of the above exception, another exception occurred:

LicenseServerConnectionError              Traceback (most recent call last)
<ipython-input-2-2f85dfd4d228> in <module>
      1 from ansys.mapdl.core import launch_mapdl
      2
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")
      4
      5 print(mapdl.prep7())

C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
   1536         # to the license check
   1537         if license_server_check:
-> 1538             lic_check.check()
   1539             # pass
   1540         raise exception

C:\Anaconda\lib\site-packages\ansys\mapdl\core\licensing.py in check(self)
    443             return True
    444         elif self._license_file_success is False:
--> 445             raise LicenseServerConnectionError("\n".join(self._license_file_msg))
    446
    447         if self._license_checkout_success:

LicenseServerConnectionError: 2022/08/09 22:42:38    DENIED              ansys                           22.2 (2022.0502)             1/0/0/0                 1/1/1/1   2252:FEAT_ANSYS:Shekhar Srivastava@DESKTOP-N96VMAF:winx64   6900:192.168.1.6
                Maximum licensed number of demo users already reached.
In [3]: from ansys.mapdl.core import launch_mapdl
   ...: mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp",
   ...: license_server_check = False
   ...: )
   ...: 
   ...: print(mapdl.prep7())
*** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE 2022 R2          22.2     ***
 Ansys Mechanical Enterprise Academic Student
 00000000  VERSION=WINDOWS x64   22:45:27  AUG 09, 2022 CP=      0.312

          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****
germa89 commented 2 years ago
LicenseServerConnectionError: 2022/08/09 22:42:38    DENIED              ansys                           22.2 (2022.0502)             1/0/0/0                 1/1/1/1   2252:FEAT_ANSYS:Shekhar Srivastava@DESKTOP-N96VMAF:winx64   6900:192.168.1.6
                Maximum licensed number of demo users already reached.

It seems you don't have licenses?

But with license_server_check=False it does work.

FiniteShekhar commented 2 years ago

But I am using Ansys Student Version. Does it not have license?

germa89 commented 2 years ago

I'm not 100% sure, but maybe the license in the student version is embedded. Hence the license check is bound to fail.

FiniteShekhar commented 2 years ago

how can I get it working?

germa89 commented 2 years ago

It seems it works if you use license_server_check.

Hence, until we fix this in the next release, just use:

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(
    exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", 
    additional_switches="-smp", # this might not be needed
    license_server_check = False
)
FiniteShekhar commented 2 years ago

Okie will keep it posted here if it works. Try to fix it further.