Error "zero is not a supported scheme"

-1

I'm trying to use CouchDB together with Python, I installed them correctly, I went to CouchDB and I created a user, when I go to the Python compiler and execute:

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

I 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 have no idea of the concrete solution to this.

    
asked by anonymous 26.10.2017 / 15:44

1 answer

1

In the code I made above, the moment I set the data for the superuser + connection url I did not notice the position of http: //

Wrong:

zero:central@http://localhost:5984

The correct one would be:

http://zero:central@localhost:5984
    
26.10.2017 / 15:59