desktopcouch-service crashed with ImportError in <module>()

Bug #461356 reported by Adam Petaccia on 2009-10-26
226
This bug affects 44 people
Affects Status Importance Assigned to Milestone
desktopcouch (Ubuntu)
Undecided
Chad Miller

Bug Description

Binary package hint: desktopcouch

I was using evolution (adding a new task) while updating the system.

ProblemType: Crash
Architecture: i386
Date: Mon Oct 26 15:03:06 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/desktopcouch/desktopcouch-service
InterpreterPath: /usr/bin/python2.6
NonfreeKernelModules: wl
Package: desktopcouch 0.5-0ubuntu1
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/desktopcouch/desktopcouch-service
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
PythonArgs: ['/usr/lib/desktopcouch/desktopcouch-service']
SourcePackage: desktopcouch
Tags: ubuntu-unr
Title: desktopcouch-service crashed with ImportError in <module>()
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/desktopcouch/desktopcouch-service", line 46, in <module>
     import desktopcouch
 ImportError: No module named desktopcouch
Uname: Linux 2.6.31-14-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Adam Petaccia (mighmos) wrote :
tags: removed: need-duplicate-check
Chad Miller (cmiller) on 2009-12-17
visibility: private → public
Chad Miller (cmiller) wrote :

This bug is weird. I'd like to know what happens if you type "import desktopocuch" at a python interpreter prompt.

Changed in desktopcouch (Ubuntu):
assignee: nobody → Chad Miller (cmiller)
status: New → Incomplete
Adam Petaccia (mighmos) wrote :

>>> python belthazor >
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import desktopcouch
>>>

I'm assuming you ment desktopcouch, instead of desktopocuch

Ivan Zorin (iaz) wrote :

Hello. I've clashed with this bug too - when I try to run gwibber:
> gwibber

** (gwibber:12540): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (gwibber:12540): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (gwibber:12540): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/usr/bin/gwibber", line 50, in <module>
    from gwibber import client
  File "/usr/lib/python2.6/dist-packages/gwibber/client.py", line 3, in <module>
    import gtk, gobject, gwui, util, resources, actions, json, gconf
  File "/usr/lib/python2.6/dist-packages/gwibber/gwui.py", line 2, in <module>
    import os, json, urlparse, resources, 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
ImportError: No module named desktopcouch
> ipython
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
Type "copyright", "credits" or "license" for more information.

IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import desktopcouch
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/tester/<ipython console> in <module>()

ImportError: No module named desktopcouch

In [2]:
----
Looks like that somehow some apps just can't see desktop couch python module.

On 05/13/2010 10:54 AM, Ivan Zorin wrote:
> }}} import desktopcouch
> ImportError: No module named desktopcouch
>
> Looks like that somehow some apps just can't see desktop couch python module.

Do you have 'desktopcouch' package installed? Please post the
transcript of this:

$ dpkg -l \*desktopcouch\*
$ dpkg -L python-desktopcouch
$ python -c "import sys, os; print [p for p in sys.path if
os.path.exists(p) and 'desktopcouch' in os.listdir(p)]"

Ivan Zorin (iaz) wrote :

> Please post the
> transcript of this:

> $ dpkg -l \*desktopcouch\*
> $ dpkg -L python-desktopcouch
> $ python -c "import sys, os; print [p for p in sys.path if
os.path.exists(p) and 'desktopcouch' in os.listdir(p)]"

Here:
> dpkg -l \*desktopcouch\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
ii desktopcouch 0.6.4-3testing1 A Desktop CouchDB instance
ii libdesktopcouch-glib-1.0-2 0.6.3-0ubuntu1 Glib-based API for Desktopcouch
ii python-desktopcouch 0.6.4-3testing1 Python Desktop CouchDB
ii python-desktopcouch-records 0.6.4-3testing1 Desktop CouchDB Records API
> dpkg -L python-desktopcouch
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/python-desktopcouch
/usr/share/doc/python-desktopcouch/changelog.Debian.gz
/usr/share/doc/python-desktopcouch/copyright
/usr/share/doc/python-desktopcouch/README
> python -c "import sys, os; print [p for p in sys.path if
dquote> os.path.exists(p) and 'desktopcouch' in os.listdir(p)]"
[]
>

Now, looks like desktopcouch python module just missing in python-desktopcouch package.

Chad Miller (cmiller) wrote :

On 05/13/2010 03:08 PM, Ivan Zorin wrote:
>> dpkg -l \*desktopcouch\*
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name Version Description
> +++-=================================-=================================-==================================================================================
> ii desktopcouch 0.6.4-3testing1 A Desktop CouchDB instance
> ii libdesktopcouch-glib-1.0-2 0.6.3-0ubuntu1 Glib-based API for Desktopcouch
> ii python-desktopcouch 0.6.4-3testing1 Python Desktop CouchDB
> ii python-desktopcouch-records 0.6.4-3testing1 Desktop CouchDB Records API
>> dpkg -L python-desktopcouch
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/python-desktopcouch
> /usr/share/doc/python-desktopcouch/changelog.Debian.gz
> /usr/share/doc/python-desktopcouch/copyright
> /usr/share/doc/python-desktopcouch/README
>
> Now, looks like desktopcouch python module just missing in python-
> desktopcouch package.

That package version "0.6.4-3testing1" looks highly suspicious to me.
Whence came that?

$ apt-cache policy python-desktopcouch

Ivan Zorin (iaz) wrote :

> That package version "0.6.4-3testing1" looks highly suspicious to me.

Oops, sorry - that package has been installed from some PPA; I've removed PPA file from sources.list.d and I've downgraded package - looks like everything fine now; I'm really sorry for disturbance and thanks a lot for help - this bug doesn't affect me anymore :-)

summary: - desktopcouch-service crashed with ImportError in <module>()
+ desktopcouch-service crashed with ImportError: No module named
+ records.server
summary: - desktopcouch-service crashed with ImportError: No module named
- records.server
+ desktopcouch-service crashed with ImportError in <module>()
nilsja (nilsjansen) wrote :

>>> import desktopcouch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named desktopcouch
>>>

nilsja (nilsjansen) wrote :

||/ Name Version Beschreibung
+++-======================================-======================================-============================================================================================
ii desktopcouch 0.6.6-0ubuntu3 A Desktop CouchDB instance
ii libdesktopcouch-glib-1.0-2 0.6.95-0ubuntu1 Glib-based API for Desktopcouch
un python-desktopcouch <keine> (keine Beschreibung vorhanden)
un python-desktopcouch-records <keine> (keine Beschreibung vorhanden)

Greg Adams (adamsgn) wrote :

I am receiving this bug in the version in the maverick repositories: 0.6.6-0ubuntu3

Martin Pool (mbp) wrote :

I'm also hitting this, or something like it, in 0.6.6-0ubuntu3, which debsums says is all unmodified.

Attached is the output from python -v -c 'import desktopcouch'

Martin Pool (mbp) wrote :

The actual specific failure I get is

% python -c 'import desktopcouch'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  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 42, in <module>
    from desktopcouch.records.server import CouchDatabase
ImportError: No module named records.server

I wonder if this is specific to the case of automatically starting the server at import time. (In my opinion starting a server as a side effect of importing a module is a bit questionable.) There are some limits here in python where if module x imports x.y which then tries to import x.z. (I don't recall the precise rule.)

Martin Pool (mbp) wrote :

Actually what I'm seeing is closer to <http://<email address hidden>/msg2412646.html> and bug 613664, but for some reason that's marked private.

Changed in desktopcouch (Ubuntu):
status: Incomplete → Confirmed
Florin (tlenze) wrote :

I hit the same bug every time I reply to an email in Evolution.

I came across this bug just now. Initially (and with the desktopcouch package installed):

$ ls /usr/lib/python2.6/dist-packages/desktopcouch/ -l
total 24
drwxr-xr-x 2 root root 4096 2010-10-09 11:11 bookmarks
drwxr-xr-x 3 root root 4096 2010-10-09 11:11 contacts
drwxr-xr-x 2 root root 4096 2010-10-09 11:11 notes
drwxr-xr-x 2 root root 4096 2010-10-09 11:11 records
drwxr-xr-x 2 root root 4096 2010-10-09 11:11 replication_services
drwxr-xr-x 2 root root 4096 2010-10-09 11:11 tasks

I was expecting at least a __init__.py, so I then simply did "sudo aptitude reinstall desktopcouch", and then:

$ ls /usr/lib/python2.6/dist-packages/desktopcouch/ -l
total 72
drwxr-xr-x 2 root root 4096 2010-11-20 10:55 bookmarks
drwxr-xr-x 3 root root 4096 2010-11-20 10:55 contacts
lrwxrwxrwx 1 root root 44 2010-11-20 10:55 __init__.py -> /usr/share/pyshared/desktopcouch/__init__.py
-rw-r--r-- 1 root root 5958 2010-11-20 10:55 __init__.pyc
lrwxrwxrwx 1 root root 47 2010-11-20 10:55 local_files.py -> /usr/share/pyshared/desktopcouch/local_files.py
-rw-r--r-- 1 root root 13173 2010-11-20 10:55 local_files.pyc
drwxr-xr-x 2 root root 4096 2010-11-20 10:55 notes
drwxr-xr-x 3 root root 4096 2010-11-20 10:55 pair
drwxr-xr-x 2 root root 4096 2010-11-20 10:55 records
lrwxrwxrwx 1 root root 47 2010-11-20 10:55 replication.py -> /usr/share/pyshared/desktopcouch/replication.py
-rw-r--r-- 1 root root 6478 2010-11-20 10:55 replication.pyc
drwxr-xr-x 2 root root 4096 2010-11-20 10:55 replication_services
lrwxrwxrwx 1 root root 55 2010-11-20 10:55 start_local_couchdb.py -> /usr/share/pyshared/desktopcouch/start_local_couchdb.py
-rw-r--r-- 1 root root 7956 2010-11-20 10:55 start_local_couchdb.pyc
lrwxrwxrwx 1 root root 54 2010-11-20 10:55 stop_local_couchdb.py -> /usr/share/pyshared/desktopcouch/stop_local_couchdb.py
-rw-r--r-- 1 root root 992 2010-11-20 10:55 stop_local_couchdb.pyc
drwxr-xr-x 2 root root 4096 2010-11-20 10:55 tasks

Now running "import desktopcouch" in python works fine. I don't know why this happened, but the desktop couch service now starts with "/usr/lib/desktopcouch/desktopcouch-service &".

Hopefully this helps those who know better to identify the source of the problem!

anatoly techtonik (techtonik) wrote :

$ dpkg -l \*desktopcou\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================-================-================================================
ii desktopcouch 0.6.9b-0ubuntu1 A Desktop CouchDB instance
ii libdesktopcouch- 0.6.96-0ubuntu1 Glib-based API for Desktopcouch
un python-desktopco <none> (no description available)
ii python-desktopco 0.6.9b-0ubuntu1 Transitional package, desktop CouchDB Records AP

Morgan Wahl (morganwahl) wrote :
Download full text (4.2 KiB)

I hit this same bug:

$ dbus-send --session --dest=org.desktopcouch.CouchDB --print-reply --type=method_call / org.desktopcouch.CouchDB.getPort
Error org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/desktopcouch/desktopcouch-service exited with status 1
$ /usr/lib/desktopcouch/desktopcouch-service
Traceback (most recent call last):
  File "/usr/lib/desktopcouch/desktopcouch-service", line 51, in <module>
    import desktopcouch
ImportError: No module named desktopcouch
$ dpkg -l \*desktopcouch\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============================-===============================-==============================================================================
ii desktopcouch 0.6.9b-0ubuntu1 A Desktop CouchDB instance
ii libdesktopcouch-glib-1.0-2 0.6.96-0ubuntu1 Glib-based API for Desktopcouch
un python-desktopcouch <none> (no description available)
ii python-desktopcouch-records 0.6.9b-0ubuntu1 Transitional package, desktop CouchDB Records API
$ ls /usr/lib/python2.6/dist-packages/desktopcouch -l
total 24
drwxr-xr-x 2 root root 4096 2010-10-18 09:23 bookmarks
drwxr-xr-x 3 root root 4096 2010-10-18 09:23 contacts
drwxr-xr-x 2 root root 4096 2010-10-18 09:23 notes
drwxr-xr-x 2 root root 4096 2010-10-18 09:23 records
drwxr-xr-x 2 root root 4096 2010-10-18 09:23 replication_services
drwxr-xr-x 2 root root 4096 2010-10-18 09:23 tasks
$ sudo aptitude reinstall desktopcouch
[sudo] password for morgan:
The following packages will be REINSTALLED:
  desktopcouch
The following packages will be REMOVED:
  hplip-cups{u}
0 packages upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 3 not upgraded.
Need to get 63.1kB of archives. After unpacking 1,458kB will be freed.
Do you want to continue? [Y/n/?]
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main desktopcouch all 0.6.9b-0ubuntu1 [63.1kB]
Fetched 63.1kB in 0s (92.7kB/s)
(Reading database ... 207006 files and directories currently installed.)
Removing hplip-cups ...
(Reading database ... 206997 files and directories currently installed.)
Preparing to replace desktopcouch 0.6.9b-0ubuntu1 (using .../desktopcouch_0.6.9b-0ubuntu1_all.deb) ...
Unpacking replacement desktopcouch ...
Setting up desktopcouch (0.6.9b-0ubuntu1) ...
Processing triggers for python-central ...

$ ls /usr/lib/python2.6/dist-packages/desktopcouch -l
total 72
drwxr-xr-x 2 root root 4096 2010-12-16 15:31 bookmarks
drwxr-xr-x 3 root root 4096 2010-12-16 15:31 contacts
lrwxrwxrwx 1 root root 44 2010-12-16 15:31 __init__.py -> /usr/share/pyshared/desktopcouch/__init__.py
-rw-r--r-- 1 root root 5958 2010-12-16 15:31 __init__.pyc
lrwxrwxrwx 1 root root 47 2010-12-16 15:31 local_files.py -> /usr/share/pyshared/desktopcouch/local_files.py
-rw-r--r-- 1 root root 13173 2010-12-16 15:31 local_files.pyc
drwx...

Read more...

dino99 (9d9) wrote :

This version has expired long time ago, and is no more supported

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

Other bug subscribers