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

How to use resume token string as input for resumeAfter ?

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.6
    • Component/s: Docs
    • Labels:
      None
    • Environment:
      Mongo 3.6

      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
       

       

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

              Created:
              Updated:
              Resolved: