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

BUG: memberactivities can't compare offset-naive and offset-aware datetimes #39

Closed
amindadgar opened this issue Jan 20, 2025 · 0 comments · Fixed by #40
Closed

BUG: memberactivities can't compare offset-naive and offset-aware datetimes #39

amindadgar opened this issue Jan 20, 2025 · 0 comments · Fixed by #40
Assignees

Comments

@amindadgar
Copy link
Member

In case the analyzer period was in utc format, it will raise errors on comparisons

  File "/home/airflow/.local/lib/python3.11/site-packages/tc_analyzer_lib/tc_analyzer.py", line 113, in run_once
    ) = memberactivity_analysis.analysis_member_activity(from_start=False)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/airflow/.local/lib/python3.11/site-packages/tc_analyzer_lib/metrics/analyzer_memberactivities.py", line 118, in analysis_member_activity
    if date_range[0] < self.analyzer_period + timedelta(days=period_size):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant