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

spectral_utils error message #568

Open
cdeline opened this issue Oct 22, 2024 · 0 comments
Open

spectral_utils error message #568

cdeline opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
v0_5_0 Include for v0.5.0 release

Comments

@cdeline
Copy link
Contributor

cdeline commented Oct 22, 2024

Error message on a new py3.13 environment. All tests in test_spectra.py are failing, but everything else passes. If this is an environment issue, then the error message needs to be made more informative.

      return (spectral_alb, spectral_dni, spectral_dhi, weighted_alb)

E UnboundLocalError: cannot access local variable 'spectral_alb' where it is not associated with a value

C:\Users\cdeline\Documents\Python Scripts\Bifacial_Radiance\bifacial_radiance\spectral_utils.py:388: UnboundLocalError
------------------------------------------------ Captured stdout call -------------------------------------------------
path = C:\Users\cdeline\Documents\Python Scripts\Bifacial_Radiance\tests
Warning: CSV file passed for input. Assuming it is TMY3style format
8760 line in WeatherFile. Assuming this is a standard hourly WeatherFile for the year for purposes of saving Gencumulativesky temporary weather files in EPW folder.
Coercing year to 2001
Filtering dates
Saving file EPWs\metdata_temp.csv, # points: 8760
Calculating Sun position for Metdata that is right-labeled with a delta of -30 mins. i.e. 12 is 11:30 sunpos
-= Non-Spectral Simulation =-
Spectra files will NOT be saved.
Weighted albedo CSV saved.
------------------------------------------------ Captured stderr call -------------------------------------------------
Generating Spectra: 100%|██████████████████████████████████████████| 16/16 [00:00<00:00, 276.31it/s]
=============================================== short test summary info ===============================================
FAILED tests/test_spectra.py::test_generate_spectra - UnboundLocalError: cannot access local variable 'spectral_alb' where it is not associated with a value
FAILED tests/test_spectra.py::test_scale_spectra - UnboundLocalError: cannot access local variable 'spectral_alb' where it is not associated with a value
FAILED tests/test_spectra.py::test_nonspectral_albedo - UnboundLocalError: cannot access local variable 'spectral_alb' where it is not associated with a value
====================================== 3 failed, 59 passed in 387.45s (0:06:27) =======================================

@cdeline cdeline added the v0_5_0 Include for v0.5.0 release label Oct 22, 2024
@cdeline cdeline self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0_5_0 Include for v0.5.0 release
Projects
None yet
Development

No branches or pull requests

1 participant