-
Notifications
You must be signed in to change notification settings - Fork 1k
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
gti_dirint raises 'UnboundLocalError: local variable 'best_ghi' referenced before assignment' #1342
Comments
The example is not fully correct (I should have converted ghi to the plane before feeding it to gti_dirint), but that doesn't really matter for the bug report. In this case, the plane doesn't see the sun during the times, so diriving the components would be trivial/impossible (the plane only sees diffuse), but, in any case, the algorithm should not raise an UnboundLocalError. |
Confirmed. The problem appears to be that Maybe put an |
It's not as simple as putting an |
How about just assigning some default values to 'best_ghi' earlier in the code? |
I'm open to suggestions. |
|
Describe the bug
irradiance.gti_dirint
fails for surface faced NorthTo Reproduce
raises
The error is not raised e.g. when
surface_azimuth = 180
.Versions:
pvlib.__version__
: 0.9.0pandas.__version__
: 1.3.4The text was updated successfully, but these errors were encountered: