bifacial_radiance
bifacial_radiance copied to clipboard
spectral_utils error message
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) =======================================