Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-43

TypeError using GridFSHandler with tz_aware MotorClient

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.3.1
    • Affects Version/s: 0.1
    • Component/s: None
    • None

      Reported on Google Groups:

      https://groups.google.com/d/msg/mongodb-user/Ructz1Z9UQQ/nK70YMojkQYJ

      GridFSHandler is a static file server that retrieves file contents from GridFS via a MotorClient.

      When the client sends the If-Modified-Since header, GridFSHandler parses it into a timezone-naive Python datetime and compares it to the file's upload_date from GridFS. If the latter is timezone-aware, because the MotorClient is timezone-aware, then datetime throws "TypeError: can't compare offset-naive and offset-aware datetimes".

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: