import gwibber.lib gives couchdb errors

Bug #577064 reported by Akkana Peck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: lernid

I installed lernid (apt-get install lernid). I have Recommends and Suggests off in apt.conf. When I try to run it, I get this:

% lernid
Traceback (most recent call last):
  File "/usr/bin/lernid", line 36, in <module>
    import gwibber.lib
  File "/usr/lib/python2.6/dist-packages/gwibber/lib/__init__.py", line 2, in <module>
    from gwibber import util
  File "/usr/lib/python2.6/dist-packages/gwibber/util.py", line 2, in <module>
    from microblog.util.couch import RecordMonitor
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/util/couch.py", line 4, in <module>
    import desktopcouch, pycurl, oauth, threading, urllib, re, json
  File "/usr/lib/python2.6/dist-packages/desktopcouch/__init__.py", line 20, in <module>
    from desktopcouch.start_local_couchdb import process_is_couchdb, read_pidfile
  File "/usr/lib/python2.6/dist-packages/desktopcouch/start_local_couchdb.py", line 38, in <module>
    from desktopcouch import local_files
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 297, in <module>
    xdg_base_dirs.save_config_path("desktop-couch"))
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 232, in __init__
    self.couch_exec_command = [COUCH_EXE, self.couch_chain_ini_files(),
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 271, in couch_chain_ini_files
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

This might be a gwibber bug rather than lernid, since it seems to be doing an "import gwibber.lib" that causes the problem.
Looks like either gwibber or lernid is trying to run COUCH_EXE, without checking whether it's installed, or requiring that it be installed.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: lernid 0.6
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic-pae 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic-pae i686
Architecture: i386
Date: Fri May 7 08:11:07 2010
PackageArchitecture: all
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/tcsh
SourcePackage: lernid

Revision history for this message
Akkana Peck (akkzilla) wrote :
Revision history for this message
Michael Budde (mbudde) wrote :

As you can see in the dependencies.txt file you attached (or apport did) both couch-db and desktopcouch are listed so I doubt it it a problem with dependencies. I don't know who's at fault here but I'm pretty sure it's not Lernid.

Revision history for this message
Akkana Peck (akkzilla) wrote :

You're right. It's a problem with couch, not lernid.

The error listed above is happening because /etc was in my path (probably a holdover from some earlier system; I don't think there's any reason I still need /etc in my path on modern Linux, but a lot of sysadmin programs used to live there.) /usr/lib/python2.6/dist-packages/desktopcouch/local_files.py line 43 does this:
    for x in os.environ['PATH'].split(':'):
        if os.path.exists(os.path.join(x, 'couchdb')):
            COUCH_EXE = os.path.join(x, 'couchdb')
and since there's both /usr/bin/couchdb and /etc/couchdb, and there's no break in the loop, couch matches the last match rather than the first one and ends up trying to execute /etc/couchdb.

But if I remove /etc from my path, and try "import gwibber.lib" in python, I just get an error a few lines farther in the same file:
>>> import gwibber.lib
>>> import gwibber.lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/gwibber/lib/__init__.py", line 2, in <module>
    from gwibber import util
  File "/usr/lib/python2.6/dist-packages/gwibber/util.py", line 2, in <module>
    from microblog.util.couch import RecordMonitor
  File "/usr/lib/python2.6/dist-packages/gwibber/microblog/util/couch.py", line 4, in <module>
    import desktopcouch, pycurl, oauth, threading, urllib, re, json
  File "/usr/lib/python2.6/dist-packages/desktopcouch/__init__.py", line 20, in <module>
    from desktopcouch.start_local_couchdb import process_is_couchdb, read_pidfile
  File "/usr/lib/python2.6/dist-packages/desktopcouch/start_local_couchdb.py", line 38, in <module>
    from desktopcouch import local_files
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 297, in <module>
    xdg_base_dirs.save_config_path("desktop-couch"))
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 237, in __init__
    self.configuration = _Configuration(self)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/local_files.py", line 91, in __init__
    {'desktopcouch': 'basic'})
gnomekeyring.IOError

That's inside a try clause, but the only exceptions handled are gnomekeyring.NoMatchError and gnomekeyring.CancelledError:, not gnomekeyring.IOError.

This is on a system that's not running a gnome desktop, so it may be assuming some gnome keyring service that isn't running, and not checking for the error in that case.

summary: - lernid package has missing dependencies (couch)
+ import gwibber.lib gives couchdb errors
affects: lernid (Ubuntu) → desktopcouch (Ubuntu)
Revision history for this message
dino99 (9d9) wrote :

outdated/deprecated version which has reached EOL does not get support

Changed in desktopcouch (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.