-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circular import error when importing terminal #312
Comments
@hiro727 I'll look into fixing that bug as part of the process of making the repo public (I'm working on it). |
I'm struggling with imports coming from everywhere but I found out that adding |
Note: adding any of the following before import ansys.edb.definition
import ansys.edb.definition.solder_ball_property
import ansys.edb.definition.material_def
import ansys.edb.definition.padstack_def
import ansys.edb.definition.dielectric_material_model
import ansys.edb.definition.material_property_thermal_modifier
import ansys.edb.definition.port_property
import ansys.edb.definition.die_property
import ansys.edb.definition.component_def
import ansys.edb.definition.component_pin
import ansys.edb.definition.ic_component_property
import ansys.edb.definition.io_component_property
import ansys.edb.layout
import ansys.edb.definition.rlc_component_property
import ansys.edb.layout.cell
import ansys.edb.definition.djordjecvic_sarkar_model
import ansys.edb.definition.component_property
import ansys.edb.layout.layout
import ansys.edb.layout.voltage_regulator
import ansys.edb.definition.debye_model
import ansys.edb.definition.dataset_def
import ansys.edb.definition.package_def
import ansys.edb.definition.multipole_debye_model
import ansys.edb.definition.padstack_def_data
import ansys.edb.definition.component_model
import ansys.edb.definition.bondwire_def
import ansys.edb.layout.mcad_model |
Following #313 discsussion, I recommend following the commentary #313 (comment) which results from a discussion with @hiro727 and @drewm102 on the approach to solve the problem. |
🔍 Before submitting the issue
🐞 Description of the bug
I just installed pyedb-core and wanted to look at the tests (good job on that part btw).
When paying with "mock/test_terminals.py" I ended up catching a circular import with the simple command
from ansys.edb.core import terminal
. The current test file seem to work because of side effects related to importingfrom utils.fixtures import *
. beforefrom ansys.edb.core import terminal
.📝 Steps to reproduce
Launch from anywhere to see the error
python -c "from ansys.edb.core import terminal"
Launch from the project (to be able to call the second import) to see the side effect
python -c "from tests.mock.utils.fixtures import *; from ansys.edb.core import terminal"
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2023.R2 but not relevant for this problem
🐍 Which Python version are you using?
3.10
📦 Installed packages
The text was updated successfully, but these errors were encountered: