After checking the file postprocessor.py I find the following in add_calculation()
if quantity not in AVAILABLE_QUANTITIES:
raise AttributeError(
"Quantity {} is not supported. Available quantities are:\n{}".format(
quantity, ", ".join(AVAILABLE_QUANTITIES)
)
)
The attribute error outputs the available quantities with a lower case starting letter --> 'temperature' vs 'Temperature'
Then fixed the argument to upper case starting letter as follows
So, the method works after updating the quantity to 'Temperature'. There are several errors which popped up and not sure if the reason is my python environment or pyaedt.
Before submitting the issue
Description of the bug
Using function evaluate_object_quantity as shown below in a conda environment
ipk.post.evaluate_object_quantity(object_name='substrate',quantity_name= 'temperature',volume=True)
PyAEDT ERROR: raise AttributeError( PyAEDT ERROR: Quantity temperature is not supported. available quantities are: temperature, surftemperature, heatflowrate, radiationflow, conductionheatflow, convectiveheatflow, heattranscoeff, heatflux, radiationflux, speed, ux, uy, uz, surfux, surfuy, surfuz, pr PyAEDT ERROR: essure, surfpressure, massflowrate, volumeflowrate, massflux, viscosityratio, wallyplus, tke, epsilon, kx, ky, kz, surfelectricpotential, electricpotential, surfcurrentdensity, currentdensity, surfcurrentdensityx, surfcurrentdensityy, surfcurrentdens PyAEDT ERROR: ityz, currentdensityx, currentdensityy, currentdensityz, surfjouleheatingdensity, jouleheatingdensity on add_calculation
After checking the file postprocessor.py I find the following in add_calculation()
The attribute error outputs the available quantities with a lower case starting letter --> 'temperature' vs 'Temperature'
Then fixed the argument to upper case starting letter as follows
ipk.post.evaluate_object_quantity(object_name='ridge1',quantity_name= 'Temperature',volume=True)
PyAEDT INFO: PostProcessor class has been initialized! Elapsed time: 0m 0sec PyAEDT INFO: Post class has been initialized! Elapsed time: 0m 0sec PyAEDT ERROR: ** PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\runpy.py", line 196, in _run_module_as_main PyAEDT ERROR: return _run_code(code, main_globals, None, PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\runpy.py", line 86, in _run_code PyAEDT ERROR: exec(code, run_globals) PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel_launcher.py", line 18, in
PyAEDT ERROR: app.launch_new_instance()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
PyAEDT ERROR: app.start()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
PyAEDT ERROR: self.io_loop.start()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
PyAEDT ERROR: self.asyncio_loop.run_forever()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\asyncio\base_events.py", line 603, in run_forever
PyAEDT ERROR: self._run_once()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\asyncio\base_events.py", line 1909, in _run_once
PyAEDT ERROR: handle._run()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\asyncio\events.py", line 80, in _run
PyAEDT ERROR: self._context.run(self._callback, self._args)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
PyAEDT ERROR: await self.process_one()
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
PyAEDT ERROR: await dispatch(args)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
PyAEDT ERROR: await result
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
PyAEDT ERROR: await super().execute_request(stream, ident, parent)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
PyAEDT ERROR: reply_content = await reply_content
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
PyAEDT ERROR: res = shell.run_cell(
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
PyAEDT ERROR: return super().run_cell(*args, **kwargs)
PyAEDT ERROR: File "C:\Users\pru\AppData\Local\Temp\15\ipykernel_17156\3211413698.py", line 1, in
PyAEDT ERROR: ipk.post.evaluate_object_quantity(object_name='ridge1',quantity_name= 'Temperature',volume=True)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\pyaedt\modules\AdvancedPostProcessing.py", line 1301, in evaluate_object_quantity
PyAEDT ERROR: return self._parse_field_summary_content(fs, setup_name, variations, quantity_name)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\pyaedt\modules\AdvancedPostProcessing.py", line 1061, in _parse_field_summary_content
PyAEDT ERROR: content = fs.get_field_summary_data(setup=setup_name, variation=design_variation)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\pyaedt\modules\PostProcessor.py", line 5580, in get_field_summary_data
PyAEDT ERROR: self.export_csv(temp_file.name, setup, variation, intrinsics)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\pyaedt\modules\PostProcessor.py", line 5631, in export_csv
PyAEDT ERROR: self._create_field_summary(setup, dv_string)
PyAEDT ERROR: File "c:\Users\pru\anaconda3\envs\pyaedt_py310\lib\site-packages\pyaedt\modules\PostProcessor.py", line 5652, in _create_field_summary
PyAEDT ERROR: self._app.osolution.EditFieldsSummarySetting(arg)
PyAEDT ERROR: AEDT API Error on _create_field_summary
PyAEDT ERROR: Last Electronics Desktop Message - [error] script macro error: edit fields summary: unrecognized argument(s) 'ridge1'). (11:15:55 pm jul 14, 2024)
PyAEDT ERROR: Method arguments: PyAEDT ERROR: setup = setup_1 : SteadyState PyAEDT ERROR: **
Along with the following output
{'Min': '62.2269', 'Max': '68.6542', 'Mean': '64.7548', 'Stdev': '1.09914', 'Unit': 'C'}
So, the method works after updating the quantity to 'Temperature'. There are several errors which popped up and not sure if the reason is my python environment or pyaedt.
Steps To Reproduce
ipk.post.evaluate_object_quantity(object_name='ridge1',quantity_name= 'Temperature',volume=True)
Which Operating System are you using?
Windows
Which Python version are you using?
3.10
Installed packages
annotated-types==0.7.0 ansys-pythonnet==3.1.0rc3 asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work attrs @ file:///C:/b/abs_35n0jusce8/croot/attrs_1695717880170/work bcrypt @ file:///C:/Windows/Temp/abs_36kl66t_aw/croots/recipe/bcrypt_1659554334050/work Bottleneck @ file:///C:/b/abs_f05kqh7yvj/croot/bottleneck_1707864273291/work Brotli @ file:///C:/b/abs_3d36mno480/croot/brotli-split_1714483178642/work certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1720457958366/work/certifi cffi @ file:///C:/b/abs_78eb1_vq6z/croot/cffi_1714483206096/work charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work clr-loader @ file:///home/conda/feedstock_root/build_artifacts/clr_loader_1691434961632/work colorama @ file:///C:/b/abs_a9ozq0l032/croot/colorama_1672387194846/work comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1710320294760/work contourpy @ file:///C:/b/abs_853rfy8zse/croot/contourpy_1700583617587/work cryptography @ file:///C:/b/abs_97lgskwerx/croot/cryptography_1714664736250/work cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work debugpy @ file:///D:/bld/debugpy_1719378820880/work decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work defusedxml==0.7.1 exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1720869315914/work executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1698579936712/work fonttools @ file:///C:/b/abs_f47gnfqnx0/croot/fonttools_1713551644747/work fpdf2==2.7.9 idna @ file:///C:/b/abs_aad84bnnw5/croot/idna_1714398896795/work importlib_metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1719361860083/work ipykernel @ file:///D:/bld/ipykernel_1719845595208/work ipython @ file:///D:/bld/ipython_1719582682925/work jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1696326070614/work jsonschema @ file:///C:/b/abs_d1c4sm8drk/croot/jsonschema_1699041668863/work jsonschema-specifications @ file:///C:/b/abs_0brvm6vryw/croot/jsonschema-specifications_1699032417323/work jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1716472197302/work jupyter_core @ file:///D:/bld/jupyter_core_1710257272359/work kiwisolver @ file:///C:/b/abs_88mdhvtahm/croot/kiwisolver_1672387921783/work loguru @ file:///C:/b/abs_1bt9_bp4tc/croot/loguru_1675318496956/work matplotlib @ file:///C:/b/abs_ddmsoovv14/croot/matplotlib-suite_1713336426307/work matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1713250518406/work mkl-fft @ file:///C:/b/abs_19i1y8ykas/croot/mkl_fft_1695058226480/work mkl-random @ file:///C:/b/abs_edwkj1_o69/croot/mkl_random_1695059866750/work mkl-service==2.4.0 nest_asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1705850609492/work numexpr @ file:///C:/b/abs_5fucrty5dc/croot/numexpr_1696515448831/work numpy @ file:///C:/b/abs_c1ywpu18ar/croot/numpy_and_numpy_base_1708638681471/work/dist/numpy-1.26.4-cp310-cp310-win_amd64.whl#sha256=ebb5aa2b36d8afa5ec3231c19e5a1fc75b6d85e7db483f0fb9e77dad58469977
packaging @ file:///C:/b/abs_c3vlh0z4jw/croot/packaging_1720101866539/work pandas @ file:///C:/b/abs_9aotnvvz16/croot/pandas_1718308978393/work/dist/pandas-2.2.2-cp310-cp310-win_amd64.whl#sha256=2770820b1c01b08888f232dfafd5c214ffee1494d66958a979d587d1ec549abe paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1712320355065/work pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work pillow @ file:///C:/b/abs_95ls_qh4c2/croot/pillow_1714398870615/work platformdirs @ file:///C:/b/abs_b6z_yqw_ii/croot/platformdirs_1692205479426/work plumbum @ file:///home/conda/feedstock_root/build_artifacts/plumbum_1714378247975/work pooch @ file:///C:/b/abs_a8nmng7d_x/croot/pooch_1695850149827/work prompt_toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1718047967974/work psutil @ file:///C:/Windows/Temp/abs_b2c2fd7f-9fd5-4756-95ea-8aed74d0039flsd9qufz/croots/recipe/psutil_1656431277748/work pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work pyaedt @ file:///D:/bld/pyaedt_1720910709501/work pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work pydantic==2.8.2 pydantic_core==2.20.1 pyedb==0.20.0 Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1714846767233/work PyNaCl @ file:///C:/Windows/Temp/abs_d5c3ajcm87/croots/recipe/pynacl_1659620667490/work pyparsing @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_7f_7lba6rl/croots/recipe/pyparsing_1661452540662/work PySocks @ file:///C:/ci_310/pysocks_1642089375450/work python-dateutil @ file:///C:/b/abs_3au_koqnbs/croot/python-dateutil_1716495777160/work pythonnet @ file:///home/conda/feedstock_root/build_artifacts/pythonnet_1697010695704/work pytomlpp==1.0.13 pytz @ file:///C:/b/abs_6ap4tsz1ox/croot/pytz_1713974360290/work pyvista @ file:///home/conda/feedstock_root/build_artifacts/pyvista_1720470165236/work pywin32==305.1 pyzmq @ file:///D:/bld/pyzmq_1715024531233/work referencing @ file:///C:/b/abs_09f4hj6adf/croot/referencing_1699012097448/work requests @ file:///C:/b/abs_9c5n24p1y7/croot/requests_1716902867639/work rpds-py @ file:///C:/b/abs_76j4g4la23/croot/rpds-py_1698947348047/work rpyc==6.0.0 Rtree==1.3.0 scooby @ file:///home/conda/feedstock_root/build_artifacts/scooby_1714897440316/work six @ file:///tmp/build/80754af9/six_1644875935023/work stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work toml==0.10.2 tornado @ file:///D:/bld/tornado_1717722834267/work traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1713535121073/work typing_extensions @ file:///C:/b/abs_0as9mdbkfl/croot/typing_extensions_1715268906610/work tzdata @ file:///croot/python-tzdata_1690578112552/work unicodedata2 @ file:///C:/b/abs_b6apldlg7y/croot/unicodedata2_1713212998255/work urllib3 @ file:///C:/b/abs_a7hvzm4y95/croot/urllib3_1718912661242/work vtk===-PKG-VERSION wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1704731205417/work win-inet-pton @ file:///C:/ci_310/win_inet_pton_1642658466512/work win32-setctime @ file:///home/tkoch/Workspace/win32_setctime/win32_setctime_1643630045199/work zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1718013267051/work