Skip to content

Content of mapdl.info.stitles not fully consistent with /stitle definitions #1356

Closed
@pthieffry

Description

@pthieffry

Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

If some of the 4 possible subtitles are not defined, the output of mapd.info.stitles will not give any indication of which subtitles were defined or not (see steps to reproduce for an example). This has been raised by a customer who uses subtitles to store information about what is being runned, but does not always fill all of the 4 possible subtitles.

Steps To Reproduce

Let say the user has defined this in APDL:

/stitle,1,'my 1st title'
/stitle,2,'my 2nd title'
/stitle,4,'my 4th title'

When retrieving subtitles from mapdl.info.stitles after reading a db or rst file, the returned list will be ['my 1st title',my 2nd title','my 4th title']

User would rather expect ['my 1st title','my 2nd title','','my 4th title'], where the 3rd item in the list is empty. Otherwise, he does not know which subtitles from 1 to 4 were defined or not.

A workaround is to use mapdl.info.titles:

titles=mapdl.info.titles

print('All titles : \n{0}\n'.format(titles))

subtitles=['','','','']
for string in titles.split('\n'):
    if string.find('TITLE=')!=-1:
        main_title=string[7:].rstrip()
    if string.find('SUBTITLE')!=-1:
        subtitles[int(string[10])-1]=string[13:].rstrip()        `

Which Operating System are you using?

Windows

Which Python version are you using?

3.7

PyMAPDL Report

PyMAPDL Software and Environment Report

PyMAPDL Report

Packages Requirements
*********************

Core packages
-------------
ansys.mapdl.core    : 0.63.1
numpy               : 1.21.5
appdirs             : 1.4.4
scipy               : 1.7.3
grpc                : Package not found
ansys.api.mapdl.v0  : 0.4.1
ansys.mapdl.reader  : 0.51.10
google.protobuf     : Package not found

Optional packages
-----------------
matplotlib          : 3.5.1
pyvista             : 0.33.3
pyiges              : 0.2.1
tqdm                : 4.63.0
ansys_corba         : 0.1.0


Ansys Installation
******************
Version   Location
------------------
202       C:\Program Files\ANSYS Inc\v202
211       C:\Program Files\ANSYS Inc\v211
212       C:\Program Files\ANSYS Inc\v212
221       C:\Program Files\ANSYS Inc\v221


Ansys Environment Variables
***************************
ANSYS192_DIR                   C:\Program Files\ANSYS Inc\v192\ANSYS
ANSYS202_DIR                   C:\Program Files\ANSYS Inc\v202\ANSYS
ANSYS211_DIR                   C:\Program Files\ANSYS Inc\v211\ANSYS
ANSYS212_DIR                   C:\Program Files\ANSYS Inc\v212\ANSYS
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
ANSYSEM_ROOT212                C:\Program Files\AnsysEM\AnsysEM21.2\Win64
ANSYSLIC_DIR                   C:\Program Files\ANSYS Inc\Shared Files\Licensing
ANSYS_SYSDIR                   winx64
ANSYS_SYSDIR32                 win32
AWP_LOCALE192                  en-us
AWP_LOCALE202                  en-us
AWP_LOCALE211                  en-us
AWP_LOCALE212                  en-us
AWP_LOCALE221                  en-us
AWP_LOCALE222                  en-us
AWP_LOCALE231                  en-us
AWP_ROOT192                    C:\Program Files\ANSYS Inc\v192
AWP_ROOT202                    C:\Program Files\ANSYS Inc\v202
AWP_ROOT211                    C:\Program Files\ANSYS Inc\v211
AWP_ROOT212                    C:\Program Files\ANSYS Inc\v212
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_ROOTDV_DEV                 C:\Program Files\ANSYS Inc\v231
CADOE_LIBDIR192                C:\Program Files\ANSYS Inc\v192\CommonFiles\Language\en-us
CADOE_LIBDIR202                C:\Program Files\ANSYS Inc\v202\CommonFiles\Language\en-us
CADOE_LIBDIR211                C:\Program Files\ANSYS Inc\v211\CommonFiles\Language\en-us
CADOE_LIBDIR212                C:\Program Files\ANSYS Inc\v212\CommonFiles\Language\en-us
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

Installed packages

Installed packages

aiohttp==3.8.1
aiosignal==1.2.0
alabaster==0.7.12
ansi2html==1.7.0
ansys-api-mapdl==0.5.1
ansys-api-mapdl-v0==0.4.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-corba==0.1.0
ansys-dpf-core==0.5.1
ansys-dpf-gate==0.1.0
ansys-dpf-post==0.2.2
ansys-mapdl-core==0.63.1
ansys-mapdl-reader==0.51.10
ansys-mechanical-pymechanical @ file:///C:/Users/pthieffr/Downloads/ansys_mechanical_pymechanical-0.1.dev0-py3-none-any.whl
ansys-platform-instancemanagement==1.0.2
ansys.grpc.dpf==0.5.0
anyio @ file:///C:/ci/anyio_1644463705902/work/dist
appdirs==1.4.4
argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work
argon2-cffi-bindings @ file:///C:/ci/argon2-cffi-bindings_1644569848815/work
arrow==0.13.1
astroid @ file:///C:/ci/astroid_1628063231892/work
async-timeout==4.0.2
asynctest==0.13.0
atomicwrites==1.4.0
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
autobahn==22.2.2
Automat==20.2.0
autopep8 @ file:///opt/conda/conda-bld/autopep8_1639166893812/work
Babel @ file:///tmp/build/80754af9/babel_1620871417480/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
bcrypt @ file:///C:/ci/bcrypt_1597918112552/work
binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work
black==19.10b0
bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work
Brotli==1.0.9
brotlipy==0.7.0
cachetools==5.0.0
certifi==2021.10.8
cffi @ file:///C:/ci_310/cffi_1642682485096/work
chardet @ file:///C:/ci/chardet_1607706910910/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
click @ file:///C:/ci/click_1646038601470/work
cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1632508026186/work
colorama @ file:///tmp/build/80754af9/colorama_1607707115595/work
colored==1.4.3
colour==0.1.5
component-service-client @ file:///C:/ansysdev/component_service_client-21.1.0-py3-none-any.whl
constantly==15.1.0
cookiecutter @ file:///tmp/build/80754af9/cookiecutter_1617748928239/work
cryptography @ file:///C:/ci/cryptography_1639414690059/work
cycler==0.11.0
dash==2.3.0
dash-bootstrap-components==1.0.3
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
dash-treeview-antd==0.0.1
dash-vtk==0.0.9
debugpy @ file:///C:/ci/debugpy_1637091911212/work
decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work
defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work
diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work
docutils @ file:///C:/ci/docutils_1638528664571/work
entrypoints==0.3
et-xmlfile==1.1.0
flake8==4.0.1
Flask==2.0.3
Flask-Compress==1.11
fonttools==4.30.0
frozenlist==1.3.0
geomdl==5.3.1
Gooey==1.0.8.1
google-api-core==2.7.1
google-api-python-client==2.40.0
google-auth==2.6.0
google-auth-httplib2==0.1.0
googleapis-common-protos==1.53.0
grpcio==1.44.0
grpcio-tools==1.44.0
httplib2==0.20.4
hyperlink==21.0.0
idna @ file:///tmp/build/80754af9/idna_1637925883363/work
igraph==0.9.9
imageio==2.16.1
imagesize @ file:///tmp/build/80754af9/imagesize_1637939814114/work
importlib-metadata==4.2.0
incremental==21.3.0
inflection==0.5.1
iniconfig==1.1.1
intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work
ipycanvas==0.11.0
ipyevents==2.0.1
ipykernel @ file:///C:/ci/ipykernel_1647000985174/work/dist/ipykernel-6.9.1-py3-none-any.whl
ipython @ file:///C:/ci/ipython_1643800131373/work
ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work
ipyvtklink==0.2.2
ipywidgets==7.7.0
isort @ file:///tmp/build/80754af9/isort_1628603791788/work
itsdangerous==2.1.1
jedi @ file:///C:/ci/jedi_1644297241925/work
jellyfish==0.9.0
Jinja2 @ file:///tmp/build/80754af9/jinja2_1612213139570/work
jinja2-time @ file:///tmp/build/80754af9/jinja2-time_1617751524098/work
joblib==1.1.0
json5 @ file:///tmp/build/80754af9/json5_1624432770122/work
jsonschema @ file:///Users/ktietz/demo/mc3/conda-bld/jsonschema_1630511932244/work
jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1616770841739/work
jupyter-core @ file:///C:/ci/jupyter_core_1646976467633/work
jupyter-dash==0.4.1
jupyter-server @ file:///opt/conda/conda-bld/jupyter_server_1644494914632/work
jupyterlab @ file:///opt/conda/conda-bld/jupyterlab_1644830542042/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
jupyterlab-server @ file:///opt/conda/conda-bld/jupyterlab_server_1644500396812/work
jupyterlab-widgets==1.1.0
keyring @ file:///C:/ci/keyring_1638531658822/work
kiwisolver==1.4.0
lazy-object-proxy @ file:///C:/ci/lazy-object-proxy_1616529290879/work
MarkupSafe @ file:///C:/ci/markupsafe_1594405949945/work
matplotlib==3.5.1
matplotlib-inline @ file:///tmp/build/80754af9/matplotlib-inline_1628242447089/work
mccabe==0.6.1
mistune @ file:///C:/ci/mistune_1594373272338/work
multidict==6.0.2
mypy-extensions==0.4.3
nbclassic @ file:///opt/conda/conda-bld/nbclassic_1644943264176/work
nbclient @ file:///tmp/build/80754af9/nbclient_1645431659072/work
nbconvert @ file:///C:/ci/nbconvert_1624479160228/work
nbformat @ file:///tmp/build/80754af9/nbformat_1617383369282/work
nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1613680548246/work
networkx @ file:///tmp/build/80754af9/networkx_1633639043937/work
nodeeditor==0.9.13
notebook @ file:///C:/ci/notebook_1645002740769/work
numpy==1.21.5
numpy-stl==2.16.3
numpydoc @ file:///opt/conda/conda-bld/numpydoc_1643788541039/work
opencv-python==4.5.5.64
openpyxl==3.0.9
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.3.5
pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work
paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work
parso @ file:///opt/conda/conda-bld/parso_1641458642106/work
pathspec==0.7.0
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
Pillow==9.0.1
plotly==5.6.0
pluggy @ file:///C:/ci/pluggy_1633715373163/work
poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work
progressbar2==4.0.0
prometheus-client @ file:///opt/conda/conda-bld/prometheus_client_1643788673601/work
prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1633440160888/work
protobuf==3.19.4
protoc-gen-swagger==0.1.0
psutil==5.9.0
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
py==1.11.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.8.0
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1621600989141/work
pyflakes==2.4.0
Pygments @ file:///opt/conda/conda-bld/pygments_1644249106324/work
pygtrie==2.4.2
pyiges==0.2.1
pylint @ file:///C:/ci/pylint_1627536899769/work
pyls-spyder==0.4.0
PyNaCl @ file:///C:/ci/pynacl_1595009241355/work
pyOpenSSL @ file:///opt/conda/conda-bld/pyopenssl_1643788558760/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pypcu==0.21.11
PyQt5==5.12.3
PyQt5-sip==12.9.1
PyQtWebEngine==5.12.1
pyrsistent @ file:///C:/ci/pyrsistent_1636093257833/work
PySocks @ file:///C:/ci/pysocks_1594394709107/work
pytest==7.1.1
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
python-igraph==0.9.9
python-lsp-black @ file:///tmp/build/80754af9/python-lsp-black_1634232156041/work
python-lsp-jsonrpc==1.0.0
python-lsp-server==1.3.3
python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work
python-utils==3.1.0
pytz==2021.3
pyvista==0.33.3
PyWavelets==1.3.0
pywin32==302
pywin32-ctypes @ file:///C:/ci/pywin32-ctypes_1594392691209/work
pywinpty @ file:///C:/ci_310/pywinpty_1644230983541/work/target/wheels/pywinpty-2.0.2-cp37-none-win_amd64.whl
PyYAML==6.0
pyzmq @ file:///C:/ci/pyzmq_1638435182681/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_1637160816833/work
qtconsole @ file:///opt/conda/conda-bld/qtconsole_1643819126524/work
QtPy @ file:///opt/conda/conda-bld/qtpy_1643087291789/work
regex @ file:///C:/ci/regex_1629302311830/work
requests @ file:///opt/conda/conda-bld/requests_1641824580448/work
retrying==1.3.3
rope @ file:///opt/conda/conda-bld/rope_1643788605236/work
rsa==4.8
Rtree @ file:///C:/ci/rtree_1618421019532/work
scikit-image==0.19.2
scikit-learn==1.0.2
scipy==1.7.3
scooby==0.5.12
# Editable install with no version control (seattle-automation==0.1.dev0)
-e d:\support\seattle\src
Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work
sip==6.5.1
six @ file:///tmp/build/80754af9/six_1644875935023/work
sniffio @ file:///C:/ci/sniffio_1614030522573/work
snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work
sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work
Sphinx==1.8.5
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1597081412696/work
spyder==5.2.2
spyder-kernels==2.1.3
stl==0.0.3
tenacity==8.0.1
terminado @ file:///C:/ci/terminado_1644322782754/work
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
texttable==1.6.4
threadpoolctl==3.1.0
three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work
tifffile==2021.11.2
tinycss @ file:///tmp/build/80754af9/tinycss_1617713798712/work
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==2.0.1
tornado @ file:///C:/ci/tornado_1606935947090/work
tqdm==4.63.0
traitlets @ file:///tmp/build/80754af9/traitlets_1636710298902/work
Twisted==22.2.0
twisted-iocpsupport==1.0.2
txaio==22.2.1
typed-ast @ file:///C:/ci/typed-ast_1624953789477/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
ujson @ file:///C:/ci/ujson_1611244941645/work
Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work
uritemplate==4.1.1
urllib3 @ file:///opt/conda/conda-bld/urllib3_1643638302206/work
vtk==9.0.3
watchdog @ file:///C:/ci/watchdog_1638367455435/work
wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work
webencodings==0.5.1
websocket-client @ file:///C:/ci/websocket-client_1614804293275/work
Werkzeug==2.0.3
whichcraft @ file:///tmp/build/80754af9/whichcraft_1617751293875/work
widgetsnbextension==3.6.0
win-inet-pton @ file:///C:/ci/win_inet_pton_1605306165655/work
wincertstore==0.2
wrapt==1.12.1
wslink==1.4.3
wxPython==4.1.1
yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work
yarl==1.7.2
zipp @ file:///opt/conda/conda-bld/zipp_1641824620731/work
zope.interface==5.4.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions