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

Tutorial 11 EPW files issues #552

Closed
mvavrovic opened this issue Sep 25, 2024 · 2 comments
Closed

Tutorial 11 EPW files issues #552

mvavrovic opened this issue Sep 25, 2024 · 2 comments
Assignees
Labels
bug v0_5_0 Include for v0.5.0 release

Comments

@mvavrovic
Copy link

Hello! I'm trying to get this to run, but seem to have some kind of data format error. Is this a know problem / version / os issue?

Thanks!

Running the file:

Working on a  Windows 11
Python version  3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]
Pandas version  2.2.2
bifacial_radiance version  0.4.3
Your simulation will be stored in C:\bifacial_radiance\TEMP\Tutorial_11
path = C:\bifacial_radiance\TEMP\Tutorial_11
Loading albedo, 1 value(s), 0.200 avg
1 nonzero albedo values.
Getting weather file: USA_NJ_McGuire.AFB.724096_TMY3.epw
 ... OK!
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

Results in


Exception has occurred: ValueError
cannot assemble the datetimes: day is out of range for month, at position 59. You might want to try:
    - passing `format` if your strings have a consistent format;
    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.
ValueError: day is out of range for month, at position 59. You might want to try:
    - passing `format` if your strings have a consistent format;
    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.

The above exception was the direct cause of the following exception:

  File "C:\Dev\BifacialRadiance\tut11.py", line 132, in <module>
    metdata = demo.readWeatherFile(epwfile, coerce_year=2001)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot assemble the datetimes: day is out of range for month, at position 59. You might want to try:
    - passing `format` if your strings have a consistent format;
    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.
@cdeline cdeline added bug v0_5_0 Include for v0.5.0 release labels Sep 25, 2024
@cdeline cdeline self-assigned this Sep 25, 2024
@cdeline
Copy link
Contributor

cdeline commented Sep 25, 2024

This tutorial worked with bifacial_radiance v0.4.2 but is broken in v0.4.3.... need to investigate this. (and need to include tutorial .py files in our test matrix prior to new releases in the future..)

@mvavrovic
Copy link
Author

Thanks for the quick fix! I figured it had to do with leap years, didn't expect a fix before I even report my findings :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v0_5_0 Include for v0.5.0 release
Projects
None yet
Development

No branches or pull requests

2 participants