Skip to content
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

Importing Circuit class not working #367

Open
alphanoob1337 opened this issue Mar 12, 2024 · 0 comments
Open

Importing Circuit class not working #367

alphanoob1337 opened this issue Mar 12, 2024 · 0 comments

Comments

@alphanoob1337
Copy link

Environment (OS, Python version, PySpice version, simulator)

Windows 10, Python 3.11, PySpice 1.5, NgSpice

Expected Behaviour

The only way to import the Circuit class is using from PySpice.Spice.Netlist import Circuit which does not offer any possibilities to resolve naming conflicts and therefore I am not using the from ... import ... syntax.

I would expect import PySpice.Spice.Circuit or something similar to work but it does not since PySpice/Spice/__init__.py does not expose the Circuit class. Also a class Netlist is defined in Netlist.py which results in PySpice.Spice.Netlist referring to the object rather than the Netlist.py file.

Actual Behaviour

ModuleNotFoundError                       Traceback (most recent call last)
Cell In [1], line 7
      4 import PySpice.Logging.Logging as Logging
      5 logger = Logging.setup_logging()
----> 7 import PySpice.Spice.Netlist.Circuit
      8 from PySpice.Unit import *
      9 import scipy.optimize

ModuleNotFoundError: No module named 'PySpice.Spice.Netlist.Circuit'; 'PySpice.Spice.Netlist' is not a package

Steps to reproduce the behaviour

Run import PySpice.Spice.Netlist.Circuit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant