Note that this occurs on brand new code, essentially creating a new CouchDatabase like this:
self.__database = CouchDatabase(self.__db_name, create=True)
I also got the same error trying it directly in iPython:
In [3]: import desktopcouch.records
In [4]: desktopcouch.records.server.CouchDatabase("foob")
---------------------------------------------------------------------------
ServerError Traceback (most recent call last)
/home/rick/<ipython console> in <module>()
/usr/lib/python2.6/dist-packages/desktopcouch/records/server.pyc in __init__(self, database, uri, record_factory, create, server_class, oauth_tokens)
50 port = desktopcouch.find_port()
51 uri = "http://localhost:%s" % port
52 super(CouchDatabase, self).__init__(
53 database, uri, record_factory=record_factory, create=create,
---> 54 server_class=server_class, oauth_tokens=oauth_tokens)
/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.pyc in __init__(self, database, uri, record_factory, create, server_class, **server_class_extras)
120 self.server_uri = uri
121 self._server = server_class(self.server_uri, **server_class_extras)
--> 122 if database not in self._server:
123 if create:
124 self._server.create(database)
Note that this occurs on brand new code, essentially creating a new CouchDatabase like this: self.__ db_name, create=True)
self.__database = CouchDatabase(
I also got the same error trying it directly in iPython:
In [3]: import desktopcouch. records
In [4]: desktopcouch. records. server. CouchDatabase( "foob") ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
-------
ServerError Traceback (most recent call last)
/home/rick/<ipython console> in <module>()
/usr/lib/ python2. 6/dist- packages/ desktopcouch/ records/ server. pyc in __init__(self, database, uri, record_factory, create, server_class, oauth_tokens) find_port( ) localhost:%s" % port base, self).__init__( factory= record_ factory, create=create, class=server_ class, oauth_tokens= oauth_tokens)
50 port = desktopcouch.
51 uri = "http://
52 super(CouchData
53 database, uri, record_
---> 54 server_
/usr/lib/ python2. 6/dist- packages/ desktopcouch/ records/ server_ base.pyc in __init__(self, database, uri, record_factory, create, server_class, **server_ class_extras) class(self. server_ uri, **server_ class_extras) create( database)
120 self.server_uri = uri
121 self._server = server_
--> 122 if database not in self._server:
123 if create:
124 self._server.
/usr/lib/ pymodules/ python2. 6/couchdb/ client. pyc in __contains__(self, name) head(validate_ dbname( name))
122 """
123 try:
--> 124 self.resource.
125 return True
126 except ResourceNotFound:
/usr/lib/ pymodules/ python2. 6/couchdb/ client. pyc in head(self, path, headers, **params) 'HEAD', path, headers=headers, **params)
979
980 def head(self, path=None, headers=None, **params):
--> 981 return self._request(
982
983 def post(self, path=None, content=None, headers=None, **params):
/usr/lib/ pymodules/ python2. 6/couchdb/ client. pyc in _request(self, method, path, content, headers, **params) led(error) (status_ code, error))
1033 raise PreconditionFai
1034 else:
-> 1035 raise ServerError(
1036
1037 return resp, data