-
Notifications
You must be signed in to change notification settings - Fork 24
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 am trying to get the pydpf operator to work.
The docus state that a field or field container can be used as the input and the rest of the arguments are optional.
https://dpf.docs.pyansys.com/version/stable/api/ansys/dpf/core/operators/mapping/fft/fft.html#fft
error returned:
OSError Traceback (most recent call last)
File d:\pyansys\dpf\bugs\20251202 fft fail\20251202_dpf_fft_fail2.py:37
31 op.inputs.field.connect(fields)
32 #op.inputs.scale_forward_transform.connect(my_scale_forward_transform)
33 #op.inputs.inplace.connect(my_inplace)
34 #op.inputs.force_fft_points.connect(my_force_fft_points)
35 #op.inputs.cutoff_frequency.connect(my_cutoff_frequency)
36 #op.inputs.scale_right_amplitude.connect(my_scale_right_amplitude)
---> 37 my_fields_container = op.outputs.fields_container()
File C:\spyderEnv\Lib\site-packages\ansys\dpf\core\outputs.py:103, in Output.__call__(self)
101 def __call__(self):
102 """Allow instances of the class to be callable for data retrieval purposes."""
--> 103 return self.get_data()
File C:\spyderEnv\Lib\site-packages\ansys\dpf\core\outputs.py:82, in Output.get_data(self)
79 elif type_output == "int32":
80 type_output = types.int
---> 82 output = self._operator.get_output(self._pin, type_output)
84 type_output_derive_class = self._spec.name_derived_class
85 if type_output_derive_class == "":
File C:\spyderEnv\Lib\site-packages\ansys\dpf\core\dpf_operator.py:593, in Operator.get_output(self, pin, output_type)
591 if issubclass(output_type, type_tuple[0]):
592 if len(type_tuple) >= 3:
--> 593 internal_obj = type_tuple[1](self, pin)
594 if internal_obj is None:
595 self._progress_thread = None
File C:\spyderEnv\Lib\site-packages\ansys\dpf\gate\generated\operator_capi.py:420, in OperatorCAPI.operator_getoutput_fields_container(op, iOutput)
418 errorSize = ctypes.c_int(0)
419 sError = ctypes.c_wchar_p()
--> 420 res = capi.dll.Operator_getoutput_FieldsContainer(op._internal_obj if op is not None else None, utils.to_int32(iOutput), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
421 if errorSize.value != 0:
422 raise errors.DPFServerException(sError.value)
OSError: exception: access violation reading 0x0000000000000020
The script snippet below just uses an example model to demo the failure. The result I want to process is even simpler, it is a line of node deformations around a cylinder.
Steps To Reproduce
from ansys.dpf import core as dpf
from ansys.dpf.core import examples
model = dpf.Model(examples.find_simple_bar())
print(model)
metadata = model.metadata
print(metadata.result_info)
results = model.results
displacements = results.displacement()
fields = displacements.outputs.fields_container()
# Finally, extract the data of the displacement field:
disp = fields[0].data
disp
model.metadata.meshed_region.plot(fields)
# fft of result
op = dpf.operators.mapping.fft() # operator instantiation
op.inputs.field.connect(fields)
#op.inputs.scale_forward_transform.connect(my_scale_forward_transform)
#op.inputs.inplace.connect(my_inplace)
#op.inputs.force_fft_points.connect(my_force_fft_points)
#op.inputs.cutoff_frequency.connect(my_cutoff_frequency)
#op.inputs.scale_right_amplitude.connect(my_scale_right_amplitude)
my_fields_container = op.outputs.fields_container()
Which Operating System causes the issue?
Windows
Which DPF/Ansys version are you using?
Ansys 2025 R2
Which Python version causes the issue?
3.13
Installed packages
aiohappyeyeballs==2.6.1
aiohttp==3.13.2
aiosignal==1.4.0
alabaster==1.0.0
ansys-acp-core==0.2.1
ansys-api-acp==0.3.1
ansys-api-dbu==0.3.28
ansys-api-discovery==1.0.14
ansys-api-geometry==0.4.89
ansys-api-mapdl==0.5.2
ansys-api-meshing-prime==0.1.4
ansys-api-platform-instancemanagement==1.1.3
ansys-api-tools-filetransfer==0.1.2
ansys-dpf-composites==0.7.0
ansys-dpf-core==0.14.2
ansys-geometry-core==0.14.1
ansys-mapdl-core==0.71.2
ansys-mapdl-reader==0.55.1
ansys-math-core==0.2.4
ansys-meshing-prime==0.9.3
ansys-platform-instancemanagement==1.1.2
ansys-tools-common==0.3.0
ansys-tools-filetransfer==0.2.0
ansys-tools-local-product-launcher==0.2.0
ansys-tools-path==0.8.1
ansys-tools-visualization-interface==0.11.0
anyio==4.11.0
appdirs==1.4.4
argon2-cffi==25.1.0
argon2-cffi-bindings==25.1.0
arrow==1.4.0
astroid==3.3.11
asttokens==3.0.1
async-lru==2.0.5
asyncssh==2.21.1
atomicwrites==1.4.1
attrs==25.4.0
autopep8==2.0.4
babel==2.17.0
bcrypt==5.0.0
beartype==0.22.6
beautifulsoup4==4.14.2
binaryornot==0.4.4
black==25.11.0
bleach==6.3.0
cattrs==25.3.0
certifi==2025.11.12
cffi==2.0.0
chardet==5.2.0
charset-normalizer==3.4.4
click==8.3.1
cloudpickle==3.1.2
colorama==0.4.6
comm==0.2.3
contourpy==1.3.3
cookiecutter==2.6.0
cryptography==46.0.3
cycler==0.12.1
debugpy==1.8.17
decorator==5.2.1
defusedxml==0.7.1
diff-match-patch==20241021
dill==0.4.0
docstring-to-markdown==0.17
docutils==0.21.2
easygui==0.98.3
executing==2.2.1
fastjsonschema==2.21.2
flake8==7.1.2
flexcache==0.3
flexparser==0.4
fonttools==4.60.1
fqdn==1.5.1
frozenlist==1.8.0
geomdl==5.4.0
grpcio==1.76.0
grpcio-health-checking==1.62.3
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.11
imagesize==1.4.1
importlib_metadata==8.7.0
inflection==0.5.1
intervaltree==3.1.0
ipykernel==6.31.0
ipython==9.7.0
ipython_pygments_lexers==1.1.1
ipywidgets==8.1.8
isoduration==20.11.0
isort==6.1.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.3.0
jedi==0.19.2
jellyfish==1.2.1
Jinja2==3.1.6
json5==0.12.1
jsonpointer==3.0.0
jsonschema==4.25.1
jsonschema-specifications==2025.9.1
jupyter-events==0.12.0
jupyter-lsp==2.3.0
jupyter_client==8.6.3
jupyter_core==5.9.1
jupyter_server==2.17.0
jupyter_server_proxy==4.4.0
jupyter_server_terminals==0.5.3
jupyterlab==4.5.0
jupyterlab_pygments==0.3.0
jupyterlab_server==2.28.0
jupyterlab_widgets==3.0.16
keyring==25.7.0
kiwisolver==1.4.9
lark==1.3.1
lsprotocol==2025.0.0
markdown-it-py==4.0.0
MarkupSafe==3.0.3
matplotlib==3.10.7
matplotlib-inline==0.2.1
mccabe==0.7.0
mdurl==0.1.2
mistune==3.1.4
more-itertools==10.8.0
msgpack==1.1.2
multidict==6.7.0
mypy_extensions==1.1.0
nbclient==0.10.2
nbconvert==7.16.6
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.6
notebook_shim==0.2.4
numpy==2.2.6
numpydoc==1.9.0
packaging==25.0
pandocfilters==1.5.1
parso==0.8.5
pathspec==0.12.1
pexpect==4.9.0
pickleshare==0.7.5
pillow==12.0.0
Pint==0.25.2
platformdirs==4.5.0
pluggy==1.6.0
pooch==1.8.2
prometheus_client==0.23.1
prompt_toolkit==3.0.52
propcache==0.4.1
protobuf==4.25.8
psutil==7.1.3
ptyprocess==0.7.0
pure_eval==0.2.3
pyansys-tools-versioning==0.7.0
pycodestyle==2.12.1
pycparser==2.23
pydocstyle==6.3.0
pyflakes==3.2.0
PyGithub==2.8.1
Pygments==2.19.2
pyiges==0.3.2
PyJWT==2.10.1
pylint==3.3.9
pylint-venv==3.0.4
pyls-spyder==0.4.0
PyNaCl==1.6.1
pyparsing==3.2.5
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
PyQt5_sip==12.17.1
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.2
python-dateutil==2.9.0.post0
python-json-logger==4.0.0
python-lsp-black==2.0.0
python-lsp-jsonrpc==1.1.2
python-lsp-ruff==2.3.0
python-lsp-server==1.13.2
python-slugify==8.0.4
pytokens==0.3.0
pytoolconfig==1.3.1
pyuca==1.2
pyvista==0.46.4
pywin32-ctypes==0.2.3
pywinpty==3.0.2
PyYAML==6.0.3
pyzmq==27.1.0
QDarkStyle==3.2.3
qstylizer==0.2.4
QtAwesome==1.4.0
qtconsole==5.7.0
QtPy==2.4.3
referencing==0.37.0
requests==2.32.5
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rfc3987-syntax==1.1.0
rich==14.2.0
roman-numerals-py==3.1.0
rope==1.14.0
rpds-py==0.29.0
rtree==1.4.1
ruff==0.14.6
scipy==1.16.3
scooby==0.11.0
semver==3.0.4
Send2Trash==1.8.3
setuptools==80.9.0
simpervisor==1.0.0
six==1.17.0
sniffio==1.3.1
snowballstemmer==3.0.1
sortedcontainers==2.4.0
soupsieve==2.8
Sphinx==8.2.3
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
spyder==6.1.1
spyder-kernels==3.1.2
stack-data==0.6.3
superqt==0.7.6
tabulate==0.9.0
terminado==0.18.1
text-unidecode==1.3
textdistance==4.6.3
three-merge==0.1.1
tinycss2==1.4.0
tomlkit==0.13.3
tornado==6.5.2
tqdm==4.67.1
traitlets==5.14.3
trame==3.12.0
trame-client==3.11.2
trame-common==1.0.1
trame-server==3.8.1
trame-vtk==2.10.0
trame-vuetify==3.1.0
typing_extensions==4.15.0
tzdata==2025.2
ujson==5.11.0
uri-template==1.3.0
urllib3==2.5.0
vtk==9.4.2
watchdog==6.0.0
wcwidth==0.2.14
webcolors==25.10.0
webencodings==0.5.1
websocket-client==1.9.0
websockets==15.0.1
whatthepatch==1.0.7
widgetsnbextension==4.0.15
wslink==2.5.0
yapf==0.43.0
yarl==1.22.0
zipp==3.23.0