ocfs2console crashed with DeprecationWarning in /usr/lib/python2.7/popen2.py: The popen2 module is deprecated. Use the subprocess module.

Bug #923754 reported by unwrecker
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCFS2 Tools
Fix Released
Unknown
ocfs2-tools (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Does not starting.

$ ocfs2console

** WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/usr/sbin/ocfs2console", line 38, in <module>
    from ocfs2interface.console import main
  File "/usr/lib/python2.7/dist-packages/ocfs2interface/console.py", line 23, in <module>
    from menu import Menu
  File "/usr/lib/python2.7/dist-packages/ocfs2interface/menu.py", line 23, in <module>
    from pushconfig import pushconfig_ok
  File "/usr/lib/python2.7/dist-packages/ocfs2interface/pushconfig.py", line 22, in <module>
    import o2cb_ctl
  File "/usr/lib/python2.7/dist-packages/ocfs2interface/o2cb_ctl.py", line 20, in <module>
    from process import Process
  File "/usr/lib/python2.7/dist-packages/ocfs2interface/process.py", line 20, in <module>
    import popen2
  File "/usr/lib/python2.7/popen2.py", line 13, in <module>
    DeprecationWarning, stacklevel=2)
DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: ocfs2console 1.6.3-4ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-10.18-generic 3.2.1
Uname: Linux 3.2.0-10-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Mon Jan 30 18:31:57 2012
ExecutablePath: /usr/sbin/ocfs2console
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20111129.1)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python -W\ ignore::DeprecationWarning /usr/sbin/ocfs2console
PythonArgs: ['/usr/sbin/ocfs2console']
SourcePackage: ocfs2-tools
Title: ocfs2console crashed with DeprecationWarning in /usr/lib/python2.7/popen2.py: The popen2 module is deprecated. Use the subprocess module.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
unwrecker (unwrecker) wrote :
tags: removed: need-duplicate-check
Revision history for this message
James Page (james-page) wrote :

Confirmed on latest Ubuntu precise

visibility: private → public
Changed in ocfs2-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → High
James Page (james-page)
Changed in ocfs2-tools (Ubuntu):
importance: High → Medium
Revision history for this message
James Page (james-page) wrote :

This is certainly a regression since lucid where this tool worked OK - might be todo with the 2.6->2.7 python transition.

Revision history for this message
Jacob Dyson (jdyson) wrote :

Possible temporary solution found on opensuse forums related to same problem
edit the ocfs2console
and comment out the four marked lines (-->)

#!/usr/bin/python -W ignore::DeprecationWarning

from ocfs2interface.about import process_args
nodeconf = process_args()

#
# Current pygtk treats no DISPLAY as a WARNING. This means that
# pygtk initialization tries to continue even after gtk_init() has failed.
# All sorts of fun ensues. To prevent this, we turn the warning into an
# error for the duration of gtk initialization.
#
# Originally reported as Novell bugzilla #448523.
#
-->#import warnings
-->#warnings.filterwarnings("error")

# Ignore the depreciation warning that popen2 will raise when it is imported.
# FIXME: Pending conversion to subprocess module.
-->#warnings.simplefilter("ignore", DeprecationWarning)

try:
    import gtk
except Exception, e:
    import sys
    if str(e).lower().find('display') == -1:
        print >>sys.stderr, '''ERROR: Unable to initialize the windowing
system: %s\n''' % e
    else:
        print >>sys.stderr, '''ERROR: ocfs2console needs an X11 display.
Make sure a proper setup for your display environment exists.\n'''
    sys.exit(1)
-->#warnings.filters.pop(0)

link to original OpenSuse article
http://forums.opensuse.org/english/get-technical-help-here/applications/455879-ocfs2console-doesnt-work-under-11-4-x86_64-a.html

Changed in ocfs2-tools:
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ocfs2-tools - 1.6.4-2ubuntu1

---------------
ocfs2-tools (1.6.4-2ubuntu1) raring; urgency=low

  [ Logan Rosen ]
  * Merge from Debian unstable. Remaining changes:
    - Build using dh_python2.
    - debian/patches/ubuntu-umode-ftbfs.patch: Fix FTBFS with undefined
      umode_t type in 3.3 kernels.

  [ Barry Warsaw ]
  * Fix calculation of -I paths for Python multiarch compatibility.
    - debian/patches/python-multiarch-includes.patch: Added
    - debian/rules: Add --with autoreconf and override_dh_autoreconf for
      correct invocation of autoreconf.
    - debian/control: Added B-D on dh-autoreconf.
 -- Logan Rosen <email address hidden> Sat, 08 Dec 2012 18:00:15 -0500

Changed in ocfs2-tools (Ubuntu):
status: Confirmed → Fix Released
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.