djc / couchdb-python

Python library for working with CouchDB
Other
202 stars 86 forks source link

couchdb-dump: No python 3.5 support #296

Closed max-lobur closed 8 years ago

max-lobur commented 8 years ago

Getting the following trace:

Traceback (most recent call last):
  File "/usr/local/bin/couchdb-dump", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/site-packages/couchdb/tools/dump.py", line 99, in main
    bulk_size=options.bulk_size)
  File "/usr/local/lib/python3.5/site-packages/couchdb/tools/dump.py", line 66, in dump_db
    envelope = write_multipart(output, boundary=boundary)
  File "/usr/local/lib/python3.5/site-packages/couchdb/multipart.py", line 253, in write_multipart
    return MultipartWriter(fileobj, subtype=subtype, boundary=boundary)
  File "/usr/local/lib/python3.5/site-packages/couchdb/multipart.py", line 132, in __init__
    self._write_headers(headers)
  File "/usr/local/lib/python3.5/site-packages/couchdb/multipart.py", line 179, in _write_headers
    self.fileobj.write(name.encode('utf-8'))
TypeError: write() argument must be str, not bytes
djc commented 8 years ago

Thanks for filing this issue. I'll take a look as soon as possible; however, this may take a while, since I'm very busy, and this issue is not a high priority for me. If you are able to debug this further and/or provide a patch, I can probably do better at reviewing it.