Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to use this simple example in python:

    >>> from desktopcouch.records.server import CouchDatabase
    >>> from desktopcouch.records.record import Record
    >>> db = CouchDatabase('testing', create=True)
    >>>

But only works in root account, with a regular user:

    >>> from desktopcouch.records.server import CouchDatabase
    >>> from desktopcouch.records.record import Record
    >>> db = CouchDatabase('testing', create=True)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 101, in __init__
    oauth_tokens=oauth_tokens, ctx=ctx)
    File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 75, in __init__
    oauth_tokens=oauth_tokens, ctx=ctx, views_factory=views_factory)
    File "/usr/lib/pymodules/python2.7/desktopcouch/records/database.py", line 123, in __init__
    self._reconnect()
    File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 81, in _reconnect
    port = find_port(ctx=self.ctx)
    File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/__init__.py", line 48, in find_port
    return platform_find_port(pid, ctx)
    File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/linux/__init__.py", line 100, in platform_find_port
    proxy = bus.get_object('org.desktopcouch.CouchDB', '/')
    File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
    File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
    File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
    File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
    File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken
share|improve this question

1 Answer 1

What version of Ubuntu are you using? Only being able to start desktopcouch as root sounds like this bug: 1-line "uri_file =" config fix for CouchDB 1.1.1 compatability

I proposed a fix for it, but looks like there was some issue with the unit tests (I don't think related to my fix).

Anyway, desktopcouch is now unmaintained and I recommend not building any new software upon it. If you're interested in Ubuntu sync as a service, look at U1DB, Canonical's replacement for desktopcouch.

If you're interested in using CouchDB in desktop apps, look at UserCouch and Microfiber (disclaimer: I'm the author and maintainer of both). These have both been developed as part of the Novacut project. We were originally using desktopcouch, but have since migrated away from it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.