title: Getting quote_from_bytes() expected bytes when updating couchdb document
body: <p>I am trying to update an existing document and I keep getting a typeError (quote_from_bytes() expected bytes)</p>
  
  <p>my code:</p>
  
  <pre><code>couch = couchdb.Server("&lt;http&gt;")
  couch.resource.credentials = ("USERNAME","PASSWORD")
  db = couch['mydb']
  
  id = "183848484"
  doc = db[id]
  
  """doing some operations on data here"""
  
  db[id] = doc
  </code></pre>
  
  <p>My error log:</p>
  
  <blockquote>
    <p>self.db[self.docID] = doc   File
    "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/client.py",
    line 427, in <strong>setitem</strong>
        resource = _doc_resource(self.resource, id)   File "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/client.py",
    line 1057, in _doc_resource
        return base(doc_id)   File "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/http.py",
    line 537, in <strong>call</strong>
        obj = type(self)(urljoin(self.url, *path), self.session)   File "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/http.py",
    line 678, in urljoin
        path = '/'.join([''] + [quote(s) for s in path])   File "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/http.py",
    line 678, in 
        path = '/'.join([''] + [quote(s) for s in path])   File "/home/sunilgopikrishna/.local/lib/python3.5/site-packages/couchdb/http.py",
    line 630, in quote
        return util.urlquote(string, safe)   File "/usr/lib/python3.5/urllib/parse.py", line 712, in quote
        return quote_from_bytes(string, safe)   File "/usr/lib/python3.5/urllib/parse.py", line 737, in quote_from_bytes
        raise TypeError("quote_from_bytes() expected bytes") TypeError: quote_from_bytes() expected bytes</p>
  </blockquote>
  
  <p>Thanks.</p>