Skip to content

ReadTheDocs builds failing #2795

Description

@echedey-ls

Describe the bug
RTD build of PRs #2787 and #2793 are failing.

I'm attaching a comment I had prepared to submit to RTD issues. But to sum it up, seems like the only timezones failing are those whose type is link (of any type), as per wikipedia table: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

I haven't been able to understand whether "link" type is an euphemism for "deprecated", or a reason for OSes to not bundle them. I'll defer opening an issue to RTD in case anybody of you @pvlib/pvlib-maintainer are more knowledgeable than me in this topic - which is almost 100% the case.

Down below is my nearly-completed comment that I was about to upload to RTD when I found some of the timezones did in fact work. Maybe the solution is just to go ahead with canonical timezones, but what I don't quite understand is that Ubuntu changelog does not have any mention to timezone database changes. And I haven't dug Ubuntu's source code to see exactly which database version they ship, with or without link type timezones.

vvv Comment as written to upload to RTD vvv

Details

Expected Result

Documentation to build successfully.

Actual Result

See log (trimmed):

../../examples/solar-tracking/plot_discontinuous_tracking.py failed leaving traceback:
    Traceback (most recent call last):
      File "/home/docs/checkouts/readthedocs.org/user_builds/pvlib-python/checkouts/2787/docs/examples/solar-tracking/plot_discontinuous_tracking.py", line 53, in <module>
        times = pd.date_range('2019-06-01', '2019-06-02', freq='1min', tz='US/Eastern')
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/docs/checkouts/readthedocs.org/user_builds/pvlib-python/envs/2787/lib/python3.12/site-packages/pandas/core/indexes/datetimes.py", line 1491, in date_range
        dtarr = DatetimeArray._generate_range(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/docs/checkouts/readthedocs.org/user_builds/pvlib-python/envs/2787/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py", line 461, in _generate_range
        tz = _infer_tz_from_endpoints(start, end, tz)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/docs/checkouts/readthedocs.org/user_builds/pvlib-python/envs/2787/lib/python3.12/site-packages/pandas/core/arrays/datetimes.py", line 2878, in _infer_tz_from_endpoints
        tz = timezones.maybe_get_tz(tz)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "pandas/_libs/tslibs/timezones.pyx", line 134, in pandas._libs.tslibs.timezones.maybe_get_tz
      File "pandas/_libs/tslibs/timezones.pyx", line 159, in pandas._libs.tslibs.timezones.maybe_get_tz
      File "/home/docs/.asdf/installs/python/3.12.12/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
        raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
    zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key US/Eastern'

This error appeared for the first time yesterday (that I'm aware of), presumably because we had not triggered other documentation builds earlier. But this coincides with latest release of RTD that updates Ubuntu to 26 LTS.

Here is other context, specially a previous issue on this repo:

  1. ReadTheDocs latest release updated Ubuntu to LTS 26 https://github.com/readthedocs/readthedocs.org/releases
  2. zoneinfo python native module relies, on Linux, on OS-installed IANA database, else on tzdata, hereby raising an exception if neither of them are available: https://docs.python.org/3/library/zoneinfo.html#data-sources
  3. It is reported in 2023 to RTD in Celery: ZoneInfoNotFoundError on development instance readthedocs/readthedocs.org#10453
    1. And incorporated in the PR fix Images: Add tzdata as explicit requirement readthedocs/readthedocs.org#10480
  4. Then in the following PR, when Ubuntu is updated to LTS 24, it is removed Upgrade to Ubuntu 24.04 for our application readthedocs/readthedocs.org#12002

I searched through Ubuntu's LTS changelog 24 -> 26 but couldn't locate changes to timezone databases: https://documentation.ubuntu.com/release-notes/26.04/summary-for-lts-users/

I must say the timezones that don't work for us are:

  • US/Eastern (type: link)
  • Asia/Calcutta (type: link)
  • MST (type: link†)
  • US/Mountain (type: link)
  • US/Arizona (type: link)

type link: Alternative names for canonical zones. † indicates zones that were canonical in the past but are no longer.
The previous statement, as is from Wikipedia: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
I wonder if the issue has something to do with these timezones being of such type.

We have other tz strings in our project that seem to work without any issues: Etc/GMT+5, Etc/GMT+7, UTC, America/Denver, America/Phoenix. All previous timezones type is canonical as per the same Wikipedia table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions