Skip to content

It should be impossible to instantiate a PVSystem with no Arrays #1148

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

Closed
wfvining opened this issue Jan 26, 2021 · 0 comments · Fixed by #1224
Closed

It should be impossible to instantiate a PVSystem with no Arrays #1148

wfvining opened this issue Jan 26, 2021 · 0 comments · Fixed by #1224
Milestone

Comments

@wfvining
Copy link
Contributor

Describe the bug
It should be impossible to instantiate a PVSystem with no Arrays. Currently this is possible via PVSystem(arrays=[]).

To Reproduce
Steps to reproduce the behavior:

from pvlib import pvsystem
pvsystem.PVSystem(arrays=[])

results in this PVSystem:

PVSystem:
  name: None
  inverter: None

Expected behavior
A ValueError should be raised indicating that a PVSystem must have at least one Array and suggesting that a system with an arbitrary default array can be constructed by passing arrays=None or not passing the arrays parameter at all.

Versions:

  • pvlib.__version__: 0.8.1+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants