Open agrishin opened 2 months ago
Hello @agrishin,
For Ansys 2024 R1, you need at least ansys-dpf-post==0.6.0
(with ansys-dpf-core==0.10.1
), which is only available for Python 3.9 and above.
The customer's response:
Perhaps not surprisingly the dpf version is not the problem. I have updated to the latest modules and switched to python 3.11 but the problem persists.
In [5]: from ansys.dpf import core as dpf
...: rstfile=r'D:\Documents\Software\FCDSLib-Data-US-Only\MechLib\prestress.rst'
...: model = dpf.Model(rstfile)
...:
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\core\server_types.py:912, in InProcessServer.__init__(self, ansys_path, as_global, load_operators, timeout, context)
911 try:
--> 912 data_processing_core_load_api(path, "common")
913 except Exception as e:
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\gate\utils.py:13, in data_processing_core_load_api(path, api_name)
12 if errorSize.value != 0:
---> 13 raise Exception(errorMsg.value)
Exception: Unable to load C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys\aisol\bin\winx64\DataProcessingCore.dll. Error code is 126: Module could not be found.
During handling of the above exception, another exception occurred:
NotADirectoryError Traceback (most recent call last)
Cell In[5], line 3
1 from ansys.dpf import core as dpf
2 rstfile=r'D:\Documents\Software\FCDSLib-Data-US-Only\MechLib\prestress.rst'
----> 3 model = dpf.Model(rstfile)
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\core\model.py:49, in Model.__init__(self, data_sources, server)
46 """Initialize connection with DPF server."""
48 if server is None:
---> 49 server = dpf.core._global_server()
51 self._data_sources = data_sources
52 self._server = server
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\core\server.py:75, in _global_server()
72 connect_to_server(ip, port)
73 # if true, start a server
74 else:
---> 75 start_local_server(as_global=True)
76 return dpf.core.SERVER
77 return None
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\core\server.py:245, in start_local_server(ip, port, ansys_path, as_global, load_operators, use_docker_by_default, docker_config, timeout, config, use_pypim_by_default, context)
232 server = server_type(
233 ansys_path,
234 ip,
(...)
242 context=context,
243 )
244 else:
--> 245 server = server_type(
246 ansys_path,
247 as_global=as_global,
248 load_operators=load_operators,
249 timeout=timeout,
250 context=context,
251 )
252 break
253 except errors.InvalidPortError: # allow socket in use errors
File ~\.venv\3.11\pyansys-24r1\Lib\site-packages\ansys\dpf\core\server_types.py:915, in InProcessServer.__init__(self, ansys_path, as_global, load_operators, timeout, context)
913 except Exception as e:
914 if not os.path.isdir(os.path.dirname(path)):
--> 915 raise NotADirectoryError(
916 f"DPF directory not found at {os.path.dirname(path)}"
917 f"Unable to locate the following file: {path}"
918 )
919 raise e
920 try:
NotADirectoryError: DPF directory not found at C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys\aisol\bin\winx64Unable to locate the following file: C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys\aisol\bin\winx64\DataProcessingCore
Hi @agrishin,
the last error states:
NotADirectoryError: DPF directory not found at C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys\aisol\bin\winx64
which makes it impossible to start a DPF server.
Can the customer verify that the folder does indeed not exist?
Before submitting the issue
Description of the bug
Costas Vogiatzis @ Honeywell receives the following error when attempting to read an rst file: Attempting to use the standalone DPF I get the error below. It seems that it’s looking for files that were not part of the DPF distribution:
Traceback (most recent call last): File "C:\Users\e092220.venv\3.9.6\pyansys-latest\lib\site-packages\ansys\dpf\core\server_types.py", line 896, in init data_processing_core_load_api(path, "common") File "C:\Users\e092220.venv\3.9.6\pyansys-latest\lib\site-packages\ansys\dpf\gate\utils.py", line 13, in data_processing_core_load_api raise Exception(errorMsg.value) Exception: Unable to load C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys\aisol\bin\winx64\DataProcessingCore.dll. Error code is 126: Module could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\e092220.venv\3.9.6\pyansys-latest\lib\site-packages\IPython\core\interactiveshell.py", line 3460, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in
model = dpf.Model(rstfile)
File "C:\Users\e092220.venv\3.9.6\pyansys-latest\lib\site-packages\ansys\dpf\core\model.py", line 49, in init
server = dpf.core._global_server()
File "C:\Users\e092220.venv\3.9.6\pyansys-latest\lib\site-packages\ansys\dpf\core\server.py", line 73, in _global_server
start_local_server(as_global=True)
Steps To Reproduce
ANSYS_DPF_PATH= C:\Users\e092220\Documents\TEMP\ansys_dpf_server_win_v2024.1.pre0\ansys
from ansys.dpf import core as dpf rstfile=r'D:\Documents\Software\FCDSLib-Data-US-Only\MechLib\prestress.rst' model = dpf.Model(rstfile)
Which Operating System are you using?
Windows
Which DPF/Ansys version are you using?
Ansys 2024 R1
Which Python version are you using?
3.7
Installed packages
aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.18.0 ansys-api-mapdl==0.5.1 ansys-api-platform-instancemanagement==1.0.0b3 ansys-dpf-core==0.8.1 ansys-dpf-gate==0.3.1 ansys-dpf-gatebin==0.3.1 ansys-dpf-post==0.3.0 ansys-grpc-dpf==0.7.1 ansys-mapdl-core==0.64.0 ansys-mapdl-reader==0.52.11 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 asttokens==2.2.1 async-timeout==4.0.2 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==3.1.0 click==8.1.3 colorama==0.4.6 comm==0.1.2 contourpy==1.0.7 cycler==0.11.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 et-xmlfile==1.1.0 executing==1.2.0 fastjsonschema==2.16.3 fonttools==4.39.0 fqdn==1.5.1 frozenlist==1.3.3 geomdl==5.3.1 google-api-core==2.11.0 google-api-python-client==2.81.0 google-auth==2.16.2 google-auth-httplib2==0.1.0 googleapis-common-protos==1.58.0 grpcio==1.51.3 httplib2==0.21.0 idna==3.4 imageio==2.26.0 importlib-metadata==6.0.0 importlib-resources==5.12.0 ipydatawidgets==4.3.3 ipykernel==6.21.3 ipython==8.11.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-client==8.0.3 jupyter-core==5.2.0 jupyter-events==0.6.3 jupyter-server==2.4.0 jupyter-server-fileid==0.8.0 jupyter-server-terminals==0.4.4 jupyter-server-ydoc==0.6.1 jupyter-ydoc==0.2.3 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab-server==2.20.0 jupyterlab-widgets==3.0.5 kiwisolver==1.4.4 MarkupSafe==2.1.2 matplotlib==3.7.1 matplotlib-inline==0.1.6 mistune==2.0.5 multidict==6.0.4 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.10 nbformat==5.7.3 nest-asyncio==1.5.6 notebook==6.5.3 notebook-shim==0.2.2 numpy==1.24.2 openpyxl==3.1.2 packaging==23.0 pandas==2.0.0 pandocfilters==1.5.0 parso==0.8.3 pickleshare==0.7.5 Pillow==9.4.0 Pint==0.23 platformdirs==3.1.1 pooch==1.7.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 protobuf==3.20.3 protoc-gen-swagger==0.1.0 psutil==5.9.4 pure-eval==0.2.2 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.7 pythreejs==2.4.2 pytz==2023.3 pyvista==0.38.4 pyvistaqt==0.11.0 pywin32==305 pywinpty==2.0.10 PyYAML==6.0 pyzmq==25.0.1 QtPy==2.4.1 requests==2.28.2 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rsa==4.9 scipy==1.10.1 scooby==0.7.1 Send2Trash==1.8.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.4 stack-data==0.6.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 tornado==6.2 tqdm==4.65.0 traitlets==5.9.0 traittypes==0.2.1 trame==2.3.2 trame-client==2.7.4 trame-components==2.1.0 trame-deckgl==2.0.1 trame-markdown==2.0.2 trame-matplotlib==2.0.1 trame-plotly==2.1.0 trame-rca==0.3.0 trame-router==2.0.1 trame-server==2.9.1 trame-simput==2.3.1 trame-vega==2.0.2 trame-vtk==2.3.4 trame-vuetify==2.2.4 typing-extensions==4.10.0 tzdata==2023.3 uri-template==1.2.0 uritemplate==4.1.1 urllib3==1.26.15 vtk==9.2.6 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 wslink==1.10.1 y-py==0.5.9 yarl==1.8.2 ypy-websocket==0.8.2 zipp==3.15.0