Importing dbm.gnu requires python3-gdbm, but doesn't say so

Bug #995616 reported by Colin Watson on 2012-05-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.2 (Ubuntu)

Bug Description

With python3.2 3.2.3-0ubuntu3:

Python 3.2.3 (default, May 3 2012, 15:54:42)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm.gnu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/dbm/", line 3, in <module>
    from _gdbm import *
ImportError: No module named _gdbm

(I do have python3.2 installed, not just python3.2-minimal.)

Colin Watson (cjwatson) wrote :

This blocks porting command-not-found.

Julian Taylor (jtaylor) wrote :

works fine here if you install python3-gdbm

Changed in python3.2 (Ubuntu):
status: New → Incomplete
Julian Taylor (jtaylor) wrote :

ups I tried in precise not quantal, confirmed there

Changed in python3.2 (Ubuntu):
status: Incomplete → Confirmed
Julian Taylor (jtaylor) wrote :

no it does work, I tried import dbm.gdbm in quantal...
import dbm.gnu works fine, sorry for the noise

amd64 quantal chroot:
Setting up python3.2-minimal (3.2.3-0ubuntu3) ...
Setting up python3.2 (3.2.3-0ubuntu3) ...
Setting up python3-minimal (3.2.3-0ubuntu1) ...
Setting up python3 (3.2.3-0ubuntu1) ...
Setting up python3-gdbm (3.2.3-1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@ubuntu:/# python3 -c "import dbm.gnu"
root@ubuntu:/# python3.2 -c "import dbm.gnu"

Changed in python3.2 (Ubuntu):
status: Confirmed → Incomplete
Matthias Klose (doko) wrote :

for copyright reasons, the gdbm module is shipped in python3-gdbm. Maybe a better error message pointing to this package should be choosen

Colin Watson (cjwatson) wrote :

Ah, of course. Thanks for the cluebat, although I agree a better error would be helpful.

Changed in python3.2 (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
summary: - Cannot import dbm.gnu
+ Importing dbm.gnu requires python3-gdbm, but doesn't say so
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.2 - 3.2.3-6ubuntu1

python3.2 (3.2.3-6ubuntu1) quantal; urgency=low

  * Update to 20120910 from the 3.2 branch. Linux relevant fixes:
    - Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
      sporadic crashes in multi-thread programs when several long deallocator
      chains ran concurrently and involved subclasses of built-in container
    - Issue #15846: Fix SystemError which happened when using ast.parse in an
      exception handler on code with syntax errors.
    - Issue #15801: Make sure mappings passed to '%' formatting are actually
    - Issue #15881: Fixed atexit hook in multiprocessing.
    - Issue #15340: Fix importing the random module when /dev/urandom cannot
      be opened. This was a regression caused by the hash randomization patch.
    - Issue #15841: The readable(), writable() and seekable() methods of BytesIO
      and StringIO objects now raise ValueError when the object has been closed.
    - Issue #15509: webbrowser.UnixBrowser no longer passes empty arguments to
      Popen when %action substitutions produce empty strings.
    - Issue #12776,#11839: call argparse type function (specified by
      add_argument) only once.
    - Issue #15676: Now "mmap" check for empty files before doing the
      offset check.
    - Issue #15802: Fix test logic in TestMaildir.test_create_tmp.
    - Issue #15819: Make sure we can build Python out-of-tree from a readonly
      source directory.
    - Issue #15822: Ensure 2to3 grammar pickles are properly installed.
    - Issue #11964: Document a change in v3.2 to the behavior of the indent
      parameter of json encoding operations.

python3.2 (3.2.3-6) unstable; urgency=low

  * Don't run the testsuite on the Hurd and kfreebsd (as already done
    for python2.7).
  * Encode the version in the devhelp documentation name. LP: #787039.

python3.2 (3.2.3-5) unstable; urgency=low

  * Hint on installing the python-gdbm package on failing _gdbm import.
    LP: #995616.
  * Enable verbose build for the sharedmods target.
  * libpython3.2: Fix symlink. Closes: #686374.
  * Fix issue #15847: allow args to be a tuple in parse_args.
  * Fix issue #15340: Fix importing the random module when /dev/urandom cannot
    be opened. Regression caused by the hash randomization patch.
  * Don't use `-n' anymore to start idle in the desktop/menu files, not
    needed anymore for multiseat installations.
 -- Matthias Klose <email address hidden> Mon, 10 Sep 2012 12:32:17 +0200

Changed in python3.2 (Ubuntu):
status: Triaged → Fix Released
maximi89 (maximi89) wrote :

also affectas the distro "Windows" with Pythin 3.3, same message with a windows path.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers