Error in line 58 of passing float as list index

Bug #1022580 reported by Francesco Brundu on 2012-07-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport-symptoms (Ubuntu)
Martin Pitt

Bug Description

Description: Ubuntu 12.04 LTS
Release: 12.04

  Installed: 0.16
  Candidate: 0.16
  Version table:
 *** 0.16 0
        500 precise/main amd64 Packages
        100 /var/lib/dpkg/status

Trying to report bug with 'ubuntu-bug audio'

Step to reproduce:

'ubuntu-bug audio'

choose '2'

As a workaround I edited line 58 to

return (None, cards[int(nr/2)], nr % 2 == 0, None)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport-symptoms 0.16
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Mon Jul 9 16:29:30 2012

EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
PackageArchitecture: all
 PATH=(custom, user)
SourcePackage: apport-symptoms
UpgradeStatus: No upgrade log present (probably fresh install)

tags: added: quantal
description: updated

I really don't understand which the problem could be.

nr is taken from input as integer, for some reason in some configurations python gets a float and returns a casting error.

I cannot reproduce in my personal pc, so this should be something related to beagleboard or english usb keyboard

Changed in apport-symptoms (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti) wrote :

This would be a problem with Python 3, which we use in Ubuntu 12.10 now. It ought to work in 12.04 with Python 2, as some_int/2 is still an int (rounded down).

Changed in apport-symptoms (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport-symptoms - 0.18

apport-symptoms (0.18) quantal; urgency=low

  * symptoms/ Ensure we use integer array indexes when dividing.
    (LP: #1022580)
 -- Martin Pitt <email address hidden> Thu, 12 Jul 2012 06:59:39 +0200

Changed in apport-symptoms (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers