New issue 197 by haa...@gmail.com: couchdb-load does not work with username
and password: 'You are not a db or server admin.'
http://code.google.com/p/couchdb-python/issues/detail?id=197
What steps will reproduce the problem?
1. Make a backup with couchdb-dump
2. Create a new database with Futon
3. Make sure you are not in admin-party, setup one or more admins
4. Issue the command "couchdb-load -u serveradminusername -p
serveradminpassword --input=backup20110530.bin
http://127.0.0.1:5984/databasename"
What is the expected output? What do you see instead?
- I was expecting a list of document ids while the documents are being
loaded.
- I did get instead:
---- start output ----
Loading document '_design/main'
Traceback (most recent call last):
File "/usr/bin/couchdb-load", line 5, in <module>
load.main()
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 88, in
main
password=options.password, ignore_errors=options.ignore_errors)
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 51, in
load_db
db[docid] = doc
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in
__setitem__
resp, data = self.resource.put(id, content=content)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
**params)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in
_request
raise ServerError((status_code, error))
couchdb.client.ServerError: (401, ('unauthorized', 'You are not a db or
server admin.'))
---- end output ----
What version of the product are you using?
python-couchdb 0.6.1
couchdb 1.0.1-0ubuntu3
On what operating system?
MoonOs (ubuntu-based)
Please provide any additional information below.
I also tried the command "couchdb-load --input=backup20110530.bin
http://admin:pass...@127.0.0.1:5984/databasename
This gives me another error message:
---- start output2 ----
Loading document '_design/main'
Traceback (most recent call last):
File "/usr/bin/couchdb-load", line 5, in <module>
load.main()
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 88, in
main
password=options.password, ignore_errors=options.ignore_errors)
File "/usr/lib/pymodules/python2.6/couchdb/tools/load.py", line 51, in
load_db
db[docid] = doc
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in
__setitem__
resp, data = self.resource.put(id, content=content)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
**params)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1014, in
_request
resp, data = _make_request()
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1009, in
_make_request
body=body, headers=headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 1129,
in request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 901,
in _request
(response, content) = self._conn_request(conn, request_uri, method,
body, headers)
File "/usr/lib/python2.6/dist-packages/httplib2/__init__.py", line 865,
in _conn_request
raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at
admin:pass...@127.0.0.1
---- end output2 ----
Have you tried to update couchdb-python to at least 0.8 release? 0.6.1 was
released two years ago and mostly out of dated. One of major changes was
removing httplib2 from dependencies and support. Latest release should work
for you, but you should known about issue 176 and issue 194 to work around
those problems.
Have you tried to update couchdb-python to at least 0.8 release? 0.6.1 was
released two years ago and mostly out of dated. One of major changes was
removing httplib2 from dependencies and support modern features. Latest
release should work for you, but you should known about issue 179 and issue