BHoM / BHoM/LadybugTools_Toolkit

Running `hours_sunrise_sunset` plot fails on locations where the sun doesn't set

Open
#236 5 comments 0 reactions 2 assignees Claimed by @tg359 View on GitHub
type:bug
Dominant language
Python
Stars
3
Forks
2
Avg merge
8d 20h
Merged PRs (30d)
2

Description

#### Description:

When running `hours_sunrise_sunset` on a location where any of the sunset times cannot be retrieved, the plot fails and doesn not output anything (due to a.normalize() not working when sunset/sunrise times are null).

#### Steps to reproduce:

Run `hours_sunrise_sunset` on a location where the sun does not set (this includes twilight zones), e.g. Aberdeen.

#### Expected behaviour:

A plot that shows the hours sunrise sunset where in the middle, the block spans the height of the plot.

#### Test file(s):

using a suitable location
```
hours_sunrise_sunset(location=location)
```

#### Additional Comments

This also appears to affect hours_sunlight as well, but doesn't show errors and plots the following:
![sun_up_hours](https://github.com/user-attachments/assets/49431ee0-87af-4d1b-b69a-25824b397fb8)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.