- 
                Notifications
    You must be signed in to change notification settings 
- Fork 23
Description
Before submitting the issue
- I have checked for Compatibility issues
- I have searched among the existing issues
- I am using a Python virtual environment
Description of the bug
I wanted to read the ls dyna results, and tried to run example from
https://dpf.docs.pyansys.com/version/stable/examples/01-transient_analyses/02-lsdyna_operators.html#
but it gives out error
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_8328\2986215073.py in <module>
     42 
     43 sargs = dict(title="N", fmt="%.2e", title_font_size=30, label_font_size=20)
---> 44 N[0].plot(deform_by=u[0], scalar_bar_args=sargs)
     45 
     46 ###############################################################################
d:\users\mkanchan\pyansys_venvs\mytest\lib\site-packages\ansys\dpf\core\field.py in plot(self, shell_layers, deform_by, scale_factor, **kwargs)
    484             scale_factor=scale_factor,
    485             show_axes=kwargs.pop("show_axes", True),
--> 486             **kwargs,
    487         )
    488 
d:\users\mkanchan\pyansys_venvs\mytest\lib\site-packages\ansys\dpf\core\plotter.py in plot_contour(self, field_or_fields_container, shell_layers, meshed_region, deform_by, scale_factor, **kwargs)
    832 
    833         for field in fields_container:
--> 834             ind, mask = mesh_location.map_scoping(field.scoping)
    835             overall_data[ind] = field.data[mask]
    836 
d:\users\mkanchan\pyansys_venvs\mytest\lib\site-packages\ansys\dpf\core\elements.py in map_scoping(self, external_scope)
    661         if external_scope.location in ["Nodal", "NodalElemental"]:
    662             raise ValueError('Input scope location must be "Nodal"')
--> 663         arr = np.array(list(map(self.mapping_id_to_index.get, external_scope.ids)))
    664         mask = arr != None
    665         ind = arr[mask].astype(np.int32)
d:\users\mkanchan\pyansys_venvs\mytest\lib\site-packages\ansys\dpf\core\elements.py in mapping_id_to_index(self)
    625         """
    626         if self._mapping_id_to_index is None:
--> 627             self._mapping_id_to_index = self._build_mapping_id_to_index()
    628         return self._mapping_id_to_index
    629 
d:\users\mkanchan\pyansys_venvs\mytest\lib\site-packages\ansys\dpf\core\elements.py in _build_mapping_id_to_index(self)
    606     def _build_mapping_id_to_index(self):
    607         """Retrieve the mapping between the IDs and indices of the entity."""
--> 608         return {eid: i for i, eid in enumerate(self.scoping.ids)}
    609 
    610     @property
AttributeError: 'NoneType' object has no attribute 'ids'
Steps To Reproduce
- create virtual env with latest ansys-dpf-core
- download example
- execute all cells
Which Operating System are you using?
Windows
Which DPF/Ansys version are you using?
DPF Server as standalone
Which Python version are you using?
3.7
Installed packages
Package Version
aiofiles                              22.1.0
aiosqlite                             0.18.0
ansys-api-mapdl                       0.5.1
ansys-api-platform-instancemanagement 1.0.0b3
ansys-corba                           0.1.0
ansys-dpf-core                        0.7.4
ansys-dpf-gate                        0.3.0
ansys-dpf-gatebin                     0.3.0
ansys-dpf-post                        0.2.5
ansys-grpc-dpf                        0.7.0
ansys-grpc-mapdl                      0.4.0
ansys-mapdl-core                      0.64.0
ansys-mapdl-reader                    0.52.8
ansys-platform-instancemanagement     1.0.3
anyio                                 3.6.2
appdirs                               1.4.4
argon2-cffi                           21.3.0
argon2-cffi-bindings                  21.2.0
arrow                                 1.2.3
attrs                                 22.2.0
Babel                                 2.11.0
backcall                              0.2.0
beautifulsoup4                        4.11.2
black                                 23.1.0
bleach                                6.0.0
cached-property                       1.5.2
cachetools                            5.3.0
certifi                               2022.12.7
cffi                                  1.15.1
charset-normalizer                    3.0.1
click                                 8.1.3
colorama                              0.4.6
cycler                                0.11.0
debugpy                               1.6.6
decorator                             5.1.1
defusedxml                            0.7.1
entrypoints                           0.4
fastjsonschema                        2.16.2
fonttools                             4.38.0
fqdn                                  1.5.1
geomdl                                5.3.1
google-api-core                       2.11.0
google-api-python-client              2.76.0
google-auth                           2.16.0
google-auth-httplib2                  0.1.0
googleapis-common-protos              1.58.0
grpcio                                1.51.1
httplib2                              0.21.0
idna                                  3.4
imageio                               2.25.0
importlib-metadata                    6.0.0
importlib-resources                   5.10.2
ipykernel                             6.16.2
ipython                               7.34.0
ipython-genutils                      0.2.0
ipywidgets                            8.0.4
isoduration                           20.11.0
jedi                                  0.18.2
Jinja2                                3.1.2
json5                                 0.9.11
jsonpointer                           2.3
jsonschema                            4.17.3
jupyter                               1.0.0
jupyter_client                        7.4.9
jupyter-console                       6.4.4
jupyter_core                          4.12.0
jupyter-events                        0.5.0
jupyter-server                        1.23.5
jupyter_server_fileid                 0.6.0
jupyter_server_ydoc                   0.6.1
jupyter-ydoc                          0.2.2
jupyterlab                            3.6.0
jupyterlab-pygments                   0.2.2
jupyterlab_server                     2.19.0
jupyterlab-widgets                    3.0.5
kiwisolver                            1.4.4
MarkupSafe                            2.1.2
matplotlib                            3.5.3
matplotlib-inline                     0.1.6
mistune                               2.0.4
mypy-extensions                       0.4.3
nbclassic                             0.5.1
nbclient                              0.7.2
nbconvert                             7.2.9
nbformat                              5.7.3
nest-asyncio                          1.5.6
notebook                              6.5.2
notebook_shim                         0.2.2
numpy                                 1.21.6
packaging                             23.0
pandocfilters                         1.5.0
parso                                 0.8.3
pathspec                              0.11.0
pickleshare                           0.7.5
Pillow                                9.4.0
pip                                   23.0
pkgutil_resolve_name                  1.3.10
platformdirs                          2.6.2
pooch                                 1.6.0
prometheus-client                     0.16.0
prompt-toolkit                        3.0.36
protobuf                              3.20.3
protoc-gen-swagger                    0.1.0
psutil                                5.9.4
pyansys-tools-versioning              0.3.3
pyasn1                                0.4.8
pyasn1-modules                        0.2.8
pycparser                             2.21
Pygments                              2.14.0
pyiges                                0.2.1
pyparsing                             3.0.9
pyrsistent                            0.19.3
python-dateutil                       2.8.2
python-json-logger                    2.0.4
pytz                                  2022.7.1
pyvista                               0.38.1
pywin32                               305
pywinpty                              2.0.10
PyYAML                                6.0
pyzmq                                 25.0.0
qtconsole                             5.4.0
QtPy                                  2.3.0
requests                              2.28.2
rfc3339-validator                     0.1.4
rfc3986-validator                     0.1.1
rsa                                   4.9
scipy                                 1.7.3
scooby                                0.7.1
Send2Trash                            1.8.0
setuptools                            47.1.0
six                                   1.16.0
sniffio                               1.3.0
soupsieve                             2.3.2.post1
terminado                             0.17.1
tinycss2                              1.2.1
tomli                                 2.0.1
tornado                               6.2
tqdm                                  4.64.1
traitlets                             5.9.0
typed-ast                             1.5.4
typing_extensions                     4.4.0
uri-template                          1.2.0
uritemplate                           4.1.1
urllib3                               1.26.14
vtk                                   9.2.5
wcwidth                               0.2.6
webcolors                             1.12
webencodings                          0.5.1
websocket-client                      1.5.0
widgetsnbextension                    4.0.5
y-py                                  0.5.5
ypy-websocket                         0.8.2
zipp                                  3.12.0