ansys / ansys/pyedb-core

API material returning Error message

Open
#644 0 comments 0 reactions 2 assignees Claimed by @drewm102 View on GitHub
bug
Dominant language
Python
Stars
7
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### 🔍 Before submitting the issue

- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment

### 🐞 Description of the bug

We got pyedb-core throwing apparently harmless error log like this. We got users asking why.

PyEDB INFO: EDB initialized.
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Illegal operation on a null object')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')
ERROR - InvalidArgumentException('Material Definition get property failed.')

### 📝 Steps to reproduce

Use this code snippet to reproduce. The Material class from PyEDB is actually an internal EDB call

``` python

from pyedb.generic.general_methods import generate_unique_folder_name
import pyedb.misc.downloads as downloads
temp_folder = generate_unique_folder_name()
target_file = downloads.download_file("edb/ANSYS-HSD_V1.aedb", destination=temp_folder)
from pyedb import Edb

def main():
m_dict = {}

edb_app = Edb(edbpath=target_file, version="2025.2", grpc=True)
materials_dict = edb_app.materials.materials

for material_name, material_object in materials_dict.items():
data = {
"name": material_object.name,
"conductivity": material_object.conductivity,
"permittivity": material_object.permittivity,
"permeability": material_object.permeability,
"loss_tangent": material_object.dielectric_loss_tangent,
}
m_dict[material_name] = data

print(f"{m_dict}")
edb_app.close()

if __name__ == "__main__":
main()

```

### 💻 Which operating system are you using?

Windows

### 📀 Which ANSYS version are you using?

_No response_

### 🐍 Which Python version are you using?

3.9

### 📦 Installed packages

```shell
NA
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.