Error "zero is not a supported Scheme"

Asked

Viewed 26 times

-1

I’m trying to use Couchdb together with Python, I did the installation of both correctly, I went to Couchdbe created a user, when I go to the Python compiler and run:

import couchdb 
couch = couchdb.Server('zero:central@http://localhost:5984')
db = couch.create('test')

get the following error,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/couchdb/client.py", line 207, in create
    self.resource.put_json(name)
  File "/usr/local/lib/python3.5/dist-packages/couchdb/http.py", line 570, in put_json
    **params)
  File "/usr/local/lib/python3.5/dist-packages/couchdb/http.py", line 585, in _request_json
    headers=headers, **params)
  File "/usr/local/lib/python3.5/dist-packages/couchdb/http.py", line 581, in _request
    credentials=self.credentials)
  File "/usr/local/lib/python3.5/dist-packages/couchdb/http.py", line 289, in request
    conn = self.connection_pool.get(url)
  File "/usr/local/lib/python3.5/dist-packages/couchdb/http.py", line 505, in get
    raise ValueError('%s is not a supported scheme' % scheme)
ValueError: zero is not a supported scheme

I’ve done a lot of research, but I still haven’t got any idea of the concrete solution for this.

1 answer

1

In the code I did above, at the time I put the data of superuser + connection url I did not notice at http position://

Wrong:

zero:central@http://localhost:5984

the correct would be :

http://zero:central@localhost:5984

Browser other questions tagged

You are not signed in. Login or sign up in order to post.