Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2065

How to use resume token string as input for resumeAfter ?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Works as Designed
    • 3.6
    • None
    • Docs
    • None
    • Mongo 3.6

    Description

      Hey I am trying to resume a changestream using the token. When I provide the token in the resumeAfter argument, I am getting type mismatch error.

      What did I try ?

      token = "gl3SitAAAAAFRjxfaWQAPEQ43XRIYXprUUpFTUJxODVTeHZRAABaEARfzWwPy21FhLM0HGgXxs1aBA=="

      token =

      {"_data": bson.binary.Binary(token.encode())}

      when i pass this token as input to resumeAfter in the db["collection"].watch() function i am getting an type mismatch error (`a bytes-like object is required, not 'dict'`
      ). Couldn't find any documentation around this in the official site. Will be helpful if this is added to the documentation
       

       

      Attachments

        Activity

          People

            prashant.mital Prashant Mital (Inactive)
            santhosh@atlan.com santhosh nagaraj s
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: