ansys / pydpf-post

Data Processing Framework - Post Processing Module
https://post.docs.pyansys.com
MIT License
45 stars 9 forks source link

Unable to Run PyDPF-Post Brief Demo #747

Open git-hub-ansys-user opened 1 week ago

git-hub-ansys-user commented 1 week ago

Before submitting the issue

Description of the bug

Hello, I am encountering an issue while attempting to run the brief demo from the PyAnsys documentation (https://post.docs.pyansys.com/version/stable/).

Steps To Reproduce

I receive the following error message:

Input

from ansys.dpf import post from ansys.dpf.post import examples simulation = post.load_simulation(examples.download_crankshaft()) displacement = simulation.displacement() print(displacement)

Output

C:\temp_folder\pythonProjectAnsys.venv\Scripts\python.exe C:\temp_folder\pythonProjectAnsys\test_ansys_dpf.py C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\post_utility.py:173: Warning: Physics type is defaulting to 'mechanical'. Specify 'simulation_type' keyword if you want to use another type. warnings.warn( C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\post_utility.py:183: Warning: Analysis type is set to 'static' as default. Specify the 'simulation_type' keyword if you want to use another type. warnings.warn( Traceback (most recent call last): File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\core\errors.py", line 123, in wrapper out = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\core\model.py", line 375, in time_freq_support self._time_freq_support = timeProvider.get_output(0, types.time_freq_support) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\core\dpf_operator.py", line 572, in get_output internal_obj = type_tuple[1](self, pin) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\gate\generated\operator_capi.py", line 599, in operator_getoutput_time_freq_support raise errors.DPFServerException(sError.value) ansys.dpf.gate.errors.DPFServerException: TimeFreqSupportProvider:6<-Data sources not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\temp_folder\pythonProjectAnsys\test_ansys_dpf.py", line 4, in displacement = simulation.displacement() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\static_mechanical_simulation.py", line 401, in displacement return self._get_result( ^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\static_mechanical_simulation.py", line 277, in _get_result selection = self._build_selection( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\simulation.py", line 979, in _build_selection time_freq_sets=[self.time_freq_support.n_sets] ^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\simulation.py", line 330, in time_freq_support return self._time_frequencies ^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\post\simulation.py", line 315, in _time_frequencies return self._model.metadata.time_freq_support ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp_folder\pythonProjectAnsys.venv\Lib\site-packages\ansys\dpf\core\errors.py", line 128, in wrapper raise DPFServerException(details) ansys.dpf.gate.errors.DPFServerException: TimeFreqSupportProvider:6<-Data sources not defined

Process finished with exit code 1

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

Ansys 2024 R1

Which Python version causes the issue?

3.11

Installed packages

ansys-dpf-core 0.13.2 0.13.2 ansys-dpf-post 0.9.0 0.9.0 cachetools 5.5.0 5.5.0 certifi 2024.8.30 2024.8.30 charset-normalizer 3.4.0 3.4.0 colorama 0.4.6 0.4.6 google-api-core 2.22.0 2.23.0 google-api-python-client 2.151.0 2.152.0 google-auth 2.36.0 2.36.0 google-auth-httplib2 0.2.0 0.2.0 googleapis-common-protos 1.65.0 1.66.0 grpcio 1.67.1 1.67.1 httplib2 0.22.0 0.22.0 idna 3.10 3.10 importlib_metadata 8.5.0 8.5.0 numpy 2.1.3 2.1.3 packaging 24.2 24.2 pip 24.3.1 24.3.1 proto-plus 1.25.0 1.25.0 protobuf 5.28.3 5.28.3 psutil 6.1.0 6.1.0 pyasn1 0.6.1 0.6.1 pyasn1_modules 0.4.1 0.4.1 pyparsing 3.2.0 3.2.0 requests 2.32.3 2.32.3 rsa 4.9 4.9 scooby 0.10.0 0.10.0 setuptools 75.3.0 75.5.0 tqdm 4.67.0 4.67.0 uritemplate 4.1.1 4.1.1 urllib3 2.2.3 2.2.3 wheel 0.45.0 0.45.0 zipp 3.21.0 3.21.0

ayush-kumar-423 commented 1 week ago

@PProfizi @rlagha can someone from your team please support here. I couldn't figure out the cause, the server is running (dpf.SERVER.info) and the RST file gets downloaded in a folder. As soon you fetch the model data, it error terminates. Free licenses are available.

PProfizi commented 1 week ago

Hello @ayush-kumar-423 , hello @git-hub-ansys-user,

I have not been able to reproduce with 2025R1. I am downloading 2024R1 to try with that. One solution though would thus be to upgrade to the latest standalone DPF available (see here on how to install DPF as a standalone application).

ayush-kumar-423 commented 1 week ago

@PProfizi I haven't been able to reproduce this issue with 242 either. May I know why do you think standalone would resolve the issue?

PProfizi commented 1 week ago

@ayush-kumar-423 I just meant the user could switch to a more recent version of DPF using the standalone and could test whether this fixes the issue. Of course I'll still try and reproduce with 2024R1 and see where the error can come from.

PProfizi commented 1 week ago

@ayush-kumar-423 @git-hub-ansys-user I have not been able to reproduce the issue using the Python package versions and ANSYS version declared in the issue. It looks to me like this is coming from the install.

I am interested in how you installed the packages. For example, I noted that you have numpy==2.1.3 installed despite ansys-dpf-core==0.13.2 requiring numpy<2.