Crash with Python 3

Bug #1073919 reported by sprt
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
command-not-found
Fix Released
Undecided
Gerhard Burger
command-not-found (Ubuntu)
Fix Released
High
Barry Warsaw
Raring
Fix Released
High
Barry Warsaw
Saucy
Fix Released
High
Barry Warsaw

Bug Description

Désolé, command-not-found s'est arrêté anormalement ! Veuillez remplir un rapport de bogue à :
https://bugs.launchpad.net/command-not-found/+filebug
Veuillez inclure les informations suivantes dans le rapport :

Version de command-not-found : 0.3
Version de python : 3.2.3 final 0
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
Information sur l'exception :

'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 87, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 277, in advise
    self.install_prompt(packages[0][0])
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 217, in install_prompt
    answer = answer.decode(sys.stdin.encoding)
AttributeError: 'str' object has no attribute 'decode'

[Impact]
COMMAND_NOT_FOUND_INSTALL_PROMPT=1 cannot be used.

[Test Case]
$ COMMAND_NOT_FOUND_INSTALL_PROMPT=1 tworld
then hit 'y' at the prompt
observe the traceback

(you may have to select a different command if you have tworld already installed!)

[Regression Potential]
None known

Changed in command-not-found:
status: New → In Progress
assignee: nobody → Gerhard Burger (burger.ga)
Barry Warsaw (barry)
Changed in command-not-found (Ubuntu Raring):
status: New → In Progress
Changed in command-not-found (Ubuntu Saucy):
status: New → In Progress
Changed in command-not-found (Ubuntu Raring):
importance: Undecided → High
Changed in command-not-found (Ubuntu Saucy):
importance: Undecided → High
Changed in command-not-found (Ubuntu Raring):
assignee: nobody → Barry Warsaw (barry)
Changed in command-not-found (Ubuntu Saucy):
assignee: nobody → Barry Warsaw (barry)
Barry Warsaw (barry)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 0.3ubuntu8

---------------
command-not-found (0.3ubuntu8) saucy; urgency=low

  [ Gerhard Burger ]
  * Patch to fix traceback when getting input in Python 2 environment.
    (LP: #1073919)
 -- Barry Warsaw <email address hidden> Mon, 29 Jul 2013 18:37:17 -0400

Changed in command-not-found (Ubuntu Saucy):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello sprt, or anyone else affected,

Accepted command-not-found into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/command-not-found/0.3ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in command-not-found (Ubuntu Raring):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Sami Jaktholm (sjakthol) wrote :

The crash is gone after installing python3-commandnotfound from raring-proposed.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 0.3ubuntu7.1

---------------
command-not-found (0.3ubuntu7.1) raring-proposed; urgency=low

  [ Gerhard Burger ]
  * Patch to fix traceback when getting input in Python 3 environment.
    (LP: #1073919)
 -- Barry Warsaw <email address hidden> Mon, 29 Jul 2013 19:05:57 -0400

Changed in command-not-found (Ubuntu Raring):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Changed in command-not-found:
status: In Progress → 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.