Skip to content

"can't compare offset-naive and offset-aware datetimes" #492

@cwittens

Description

@cwittens

After this PR for a new release of Geothermalwells.jl got merged, the TagBot got automatically triggered, but I got the following error message:
(also see: https://github.com/cwittens/GeothermalWells.jl/actions/runs/21420999670/job/61681160599)

Found 2 total versions in registry
Version check complete: 1 new versions found (checked 2 total versions in 0.94s)
Version v0.1.2 has the most recent commit, will be marked as latest
Processing version v0.1.2 (7fb5044b8a71b8054543b3cdf032783f8f3f3017)
Generating changelog for version v0.1.2 (7fb5044b8a71b8054543b3cdf032783f8f3f3017)
Warning: Search API failed, falling back to issues API: can't compare offset-naive and offset-aware datetimes
Error: Failed to process version v0.1.2: can't compare offset-naive and offset-aware datetimes
Error: TagBot experienced an unexpected internal failure
Traceback (most recent call last):
  File "/root/tagbot/action/changelog.py", line 154, in _issues_and_pulls
    if x.closed_at is None or x.closed_at <= start or x.closed_at > end:
                              ^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 125, in <module>
    repo.create_release(version, sha, is_latest=is_latest)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/tagbot/action/repo.py", line 1469, in create_release
    log = self._changelog.get(version_tag, sha) if self._changelog else ""
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/root/tagbot/action/changelog.py", line 316, in get
    data = self._collect_data(version_tag, sha)
  File "/root/tagbot/action/changelog.py", line 292, in _collect_data
    issues = self._issues(start, end)
  File "/root/tagbot/action/changelog.py", line 198, in _issues
    return [i for i in self._issues_and_pulls(start, end) if isinstance(i, Issue)]
                       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/root/tagbot/action/changelog.py", line 169, in _issues_and_pulls
    return self._issues_and_pulls_fallback(start, end)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/root/tagbot/action/changelog.py", line 181, in _issues_and_pulls_fallback
    if x.closed_at <= start or x.closed_at > end:
       ^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes

Response (200): {
  "status": "Submitted error report"
}
Error: Failed to release versions: v0.1.2
Performance: 1 API calls, 0 PRs checked, 2 versions processed, 12.04s elapsed

I re-ran the job a few times, but that didnt help.

Is this a problem on my end or a bug with the Bot?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions