ansys / pyaedt

AEDT Python Client Package
https://aedt.docs.pyansys.com
MIT License
203 stars 122 forks source link

API Error when importing ODB++ file in HFSS 3DL using Remote Service Manager #5078

Closed kinielsen closed 1 month ago

kinielsen commented 1 month ago

Before submitting the issue

Description of the bug

Dear Team,

We have a problem with import of ODB++ (.tgz) file when using Remote Service Manager. The following error message is returned.

PyAEDT ERROR: ** PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\threading.py", line 1002, in _bootstrap PyAEDT ERROR: self._bootstrap_inner() PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\threading.py", line 1045, in _bootstrap_inner PyAEDT ERROR: self.run() PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\threading.py", line 982, in run PyAEDT ERROR: self._target(*self._args, self._kwargs) PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\socketserver.py", line 691, in process_request_thread PyAEDT ERROR: self.finish_request(request, client_address) PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\socketserver.py", line 361, in finish_request PyAEDT ERROR: self.RequestHandlerClass(request, client_address, self) PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\socketserver.py", line 755, in init PyAEDT ERROR: self.handle() PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\http\server.py", line 436, in handle PyAEDT ERROR: self.handle_one_request() PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\http\server.py", line 424, in handle_one_request PyAEDT ERROR: method() PyAEDT ERROR: File "c:\Users\107748\repos\ANSYSTestApp\Callbacks.py", line 63, in icepakOnRemote PyAEDT ERROR: h3d.import_odb(input_file=ODB_file, set_as_active=True, close_active_project=True) PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\site-packages\pyaedt\hfss3dlayout.py", line 1539, in import_odb PyAEDT ERROR: return self._import_cad(input_file, "odb++", output_dir, control_file, set_as_active, close_active_project) PyAEDT ERROR: File "C:\Users\107748.conda\envs\thermal_tool\Lib\site-packages\pyaedt\hfss3dlayout.py", line 1303, in _import_cad PyAEDT ERROR: method(cad_path, aedb_path, xml_path) PyAEDT ERROR: AEDT API Error on _import_cad PyAEDT ERROR: Last Electronics Desktop Message - [error] script macro error: an error occured while writing to the file. is it readonly? disk full? (07:38:37 pm aug 20, 2024) PyAEDT ERROR: Method arguments: PyAEDT ERROR: cad_path = M:\Z2804\PCB.tgz PyAEDT ERROR: cad_format = odb++ PyAEDT ERROR: set_as_active = True PyAEDT ERROR: close_active_project = True PyAEDT ERROR: ****

ODB++ file or project folder is not "read only".

We have tested the remote connection by creating a simple box in Icepak - and that works fine. So no problem there.

Can you please help ?

Best regards, Kim

Steps To Reproduce

from pyaedt import Hfss3dLayout from pyaedt.common_rpc import create_session

ODB_file = r'M:\Z2804\PCB.tgz' proj_path = r'M:\Z2804\Test.aedt'

remote_machine_ip = IP aedt_port =51000 client_port = 17817

cl1 = create_session(remote_machine_ip, aedt_port=aedt_port,client_port=i, launch_aedt_on_server=True,non_graphical=False)

h3d = Hfss3dLayout(machine=cl1.server_name, port=cl1.aedt_port,non_graphical=True)

h3d.import_odb(input_file=ODB_file, set_as_active=True, close_active_project=True) ### ERROR HERE <-----

h3d.save_project(proj_path) h3d.release_desktop()

Which Operating System are you using?

Windows

Which Python version are you using?

3.11

Installed packages

annotated-types==0.7.0 ansys-pythonnet==3.1.0rc3 attrs==23.2.0 blinker==1.8.2 certifi==2024.7.4 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 clr-loader==0.2.6 colorama==0.4.6 contourpy==1.2.1 cryptography==42.0.8 cycler==0.12.1 dash==2.17.1 dash-core-components==2.0.0 dash-design-kit==1.6.7 dash-enterprise-auth==0.2.2 dash-html-components==2.0.0 dash-table==5.0.0 defusedxml==0.7.1 dill==0.3.8 diskcache==5.6.3 et-xmlfile==1.1.0 fast_simplification==0.1.7 Flask==3.0.3 fonttools==4.53.1 fpdf2==2.7.9 geopandas==1.0.1 idna==3.7 imageio==2.34.2 importlib_metadata==8.0.0 itsdangerous==2.2.0 Jinja2==3.1.4 joblib==1.4.2 jsonschema==4.23.0 jsonschema-specifications==2023.12.1 kiwisolver==1.4.5 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.1 mdurl==0.1.2 meshio==5.3.5 multiprocess==0.70.16 nest-asyncio==1.6.0 networkx==3.3 numpy==1.26.4 openpyxl==3.1.5 osmnx==1.9.3 packaging==24.1 pandas==2.2.2 pillow==10.4.0 platformdirs==4.2.2 plotly==5.22.0 plumbum==1.8.3 pooch==1.8.2 psutil==6.0.0 pyaedt==0.9.10 pycparser==2.22 pydantic==2.8.2 pydantic_core==2.20.1 pyedb==0.21.0 Pygments==2.18.0 PyJWT==2.8.0 pyogrio==0.9.0 pyparsing==3.1.2 pyproj==3.6.1 python-dateutil==2.9.0.post0 pytomlpp==1.0.13 pytz==2024.1 pyvista==0.44.0 pywin32==306 PyYAML==6.0.1 pyyml==0.0.2 referencing==0.35.1 requests==2.32.3 retrying==1.3.4 rich==13.7.1 rpds-py==0.19.0 rpyc==6.0.0 Rtree==1.3.0 scikit-learn==1.5.1 scikit-rf==1.1.0 scipy==1.14.0 scooby==0.10.0 shapely==2.0.5 six==1.16.0 SRTM.py==0.3.7 tenacity==8.5.0 threadpoolctl==3.5.0 toml==0.10.2 typing_extensions==4.12.2 tzdata==2024.1 urllib3==2.2.2 utm==0.7.0 vtk==9.3.1 Werkzeug==3.0.3 yml==0.0.1 zipp==3.19.2

kinielsen commented 1 month ago

Resolved in Version 0.10.1 :-)