Issue 240 in couchdb-python: tools/replicate isn't compatible with python 3

7 views
Skip to first unread message

couchdb...@googlecode.com

unread,
Jul 6, 2014, 10:43:30 PM7/6/14
to couchdb...@googlegroups.com
Status: Assigned
Owner: kxepal
Labels: Type-Defect Priority-Medium

New issue 240 by kxepal: tools/replicate isn't compatible with python 3
http://code.google.com/p/couchdb-python/issues/detail?id=240

Traceback (most recent call last):
File "couchdb/tools/replicate.py", line 122, in <module>
main()
File "couchdb/tools/replicate.py", line 75, in main
sbase, spath = findpath(parser, src)
File "couchdb/tools/replicate.py", line 34, in findpath
bits = util.urlparse(s)
AttributeError: 'module' object has no attribute 'urlparse'

and after fixing import:

Traceback (most recent call last):
File "couchdb/tools/replicate.py", line 123, in <module>
main()
File "couchdb/tools/replicate.py", line 76, in main
sbase, spath = findpath(parser, src)
File "couchdb/tools/replicate.py", line 43, in findpath
data = res.get_json(parts[:i])[2]

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 555, in get_json
return self._request_json('GET', path, headers=headers, **params)

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 578, in _request_json
headers=headers, **params)

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 569, in _request
url = urljoin(self.url, path, **params)

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 675, in urljoin
path = '/'.join([''] + [quote(s) for s in path])

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 675, in <listcomp>
path = '/'.join([''] + [quote(s) for s in path])

File "/usr/local/opt/virtualenv/couchdb3k/lib/python3.4/site-packages/couchdb/http.py",
line 627, in quote
return util.urlquote(string, safe)
File "/usr/lib64/python3.4/urllib/parse.py", line 694, in quote
return quote_from_bytes(string, safe)
File "/usr/lib64/python3.4/urllib/parse.py", line 719, in quote_from_bytes
raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

couchdb...@googlecode.com

unread,
Jul 6, 2014, 10:44:30 PM7/6/14
to couchdb...@googlegroups.com

Comment #1 on issue 240 by kxepal: tools/replicate isn't compatible with
python 3
http://code.google.com/p/couchdb-python/issues/detail?id=240

Forgot the error on build:

byte-compiling build/bdist.linux-x86_64/egg/couchdb/tools/replicate.py to
replicate.cpython-34.pyc
File "build/bdist.linux-x86_64/egg/couchdb/tools/replicate.py", line 101
print sdb, '->', tdb,
^
SyntaxError: invalid syntax

couchdb...@googlecode.com

unread,
Jul 6, 2014, 10:45:50 PM7/6/14
to couchdb...@googlegroups.com

Comment #2 on issue 240 by kxepal: tools/replicate isn't compatible with
python 3
http://code.google.com/p/couchdb-python/issues/detail?id=240

(No comment was entered for this change.)

Attachments:
240.patch 3.3 KB

couchdb...@googlecode.com

unread,
Jul 7, 2014, 5:50:07 AM7/7/14
to couchdb...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 240 by djc.ochtman: tools/replicate isn't compatible
I've fixed these in a slightly different way, in rf305cd0e4a43. Thanks!
Reply all
Reply to author
Forward
0 new messages