I have a python script wherein I have imported library "ansys.dpf.core".
The code works fine when I run python file but when I convert it to exe file and the run it , it gives an error
error:
" File "pyimod03_ctypes.py", line 53, in __init__
File "ctypes\__init__.py", line 462, in __init__
FileNotFoundError: Could not find module 'C:\Users\somawom\AppData\Local\Temp\_MEI00007cb82\ansys\dpf\gatebin\DPFClientAPI.dll' (or one of its dependencies). Try using the full path with constructor syntax.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "ansys\dpf\gate\load_api.py", line 192, in _try_load_api
File "ansys\dpf\gate\generated\capi.py", line 24, in load_api
File "ctypes\__init__.py", line 543, in LoadLibrary
File "pyimod03_ctypes.py", line 55, in __init__
pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'C:\\Users\\somawom\\AppData\\Local\\Temp\\_MEI00007cb82\\ansys\\dpf\\gatebin\\DPFClientAPI.dll'. Most likely this dynlib/dll was not found when the application was frozen.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Nodal_values_extraction_Plastic.py", line 142, in <module>
File "ansys\dpf\core\model.py", line 74, in __init__
server = dpf.core._global_server()
File "ansys\dpf\core\server.py", line 110, in _global_server
start_local_server(as_global=True)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "ansys\dpf\core\server.py", line 302, in start_local_server
server = server_type(
ansys_path,
...<3 lines>...
context=context,
)
File "ansys\dpf\core\server_types.py", line 1163, in __init__
super().__init__(ansys_path=ansys_path, load_operators=load_operators)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ansys\dpf\core\server_types.py", line 746, in __init__
self._client_api_path = load_api.load_client_api(ansys_path=ansys_path)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "ansys\dpf\gate\load_api.py", line 239, in load_client_api
File "ansys\dpf\gate\load_api.py", line 215, in _try_load_api
NotADirectoryError: Unable to locate the directory containing DPF at "C:\Users\xxxx\AppData\Local\Temp\_MEI00007cb82\ansys\dpf\gatebin""