[GH-ISSUE #388] autoreply TypeError: can't compare datetime.datetime to datetime.date #372

Closed
opened 2026-02-27 11:11:26 +03:00 by kerem · 2 comments
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/388

Originally assigned to: @tonioo on GitHub.

Originally created by Fabrice Flore-Thébault on 2013-04-17T11:50:37Z

# ./manage.py autoreply --traceback --verbosity=3 xxx@xxx.be yyyy@yyyy.be --traceback --verbosity=3
Traceback (most recent call last):
  File "./manage.py", line 11, in 
    execute_manager(settings)
  File "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.6/dist-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.6/dist-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/modoboa/extensions/postfix_autoreply/management/commands/autoreply.py", line 61, in handle
    send_autoreply(sender, mbox, armessage)
  File "/usr/local/lib/python2.6/dist-packages/modoboa/extensions/postfix_autoreply/management/commands/autoreply.py", line 15, in send_autoreply
    and armessage.untildate < datetime.date.today():
TypeError: can't compare datetime.datetime to datetime.date

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/388 Originally assigned to: @tonioo on GitHub. **Originally created by Fabrice Flore-Thébault on 2013-04-17T11:50:37Z** <pre> # ./manage.py autoreply --traceback --verbosity=3 xxx@xxx.be yyyy@yyyy.be --traceback --verbosity=3 Traceback (most recent call last): File "./manage.py", line 11, in <module> execute_manager(settings) File "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line 459, in execute_manager utility.execute() File "/usr/lib/python2.6/dist-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.6/dist-packages/django/core/management/base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/lib/python2.6/dist-packages/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.6/dist-packages/modoboa/extensions/postfix_autoreply/management/commands/autoreply.py", line 61, in handle send_autoreply(sender, mbox, armessage) File "/usr/local/lib/python2.6/dist-packages/modoboa/extensions/postfix_autoreply/management/commands/autoreply.py", line 15, in send_autoreply and armessage.untildate < datetime.date.today(): TypeError: can't compare datetime.datetime to datetime.date </pre>
kerem 2026-02-27 11:11:26 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2013-04-17T11:58:36Z

Applied in changeset commit:6aa6761bd96102bdfb8ad1b2ba368a13959544a9.

<!-- gh-comment-id:29816225 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2013-04-17T11:58:36Z** Applied in changeset commit:6aa6761bd96102bdfb8ad1b2ba368a13959544a9.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Fabrice Flore-Thébault on 2013-04-17T12:01:27Z

with Révision 6aa6761b it becomes

TypeError: can't compare offset-naive and offset-aware datetimes
<!-- gh-comment-id:29816226 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Fabrice Flore-Thébault on 2013-04-17T12:01:27Z** with Révision 6aa6761b it becomes <pre> TypeError: can't compare offset-naive and offset-aware datetimes </pre>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#372
No description provided.