running 'ubuntu-bug' on ec2 to report a bug results in:
ERROR: hook /usr/share/apport/general-hooks/ubuntu.py crashed:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport/report.py", line 749, in add_hooks_info
symb['add_info'](self, ui)
File "/usr/share/apport/general-hooks/ubuntu.py", line 34, in add_info
add_cloud_info(report)
File "/usr/share/apport/general-hooks/ubuntu.py", line 323, in add_cloud_info
if ami and ami.startswith('ami'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
The fix to this as-yet-python-3-illiterate looks like:
running 'ubuntu-bug' on ec2 to report a bug results in: apport/ general- hooks/ubuntu. py crashed: python3/ dist-packages/ apport/ report. py", line 749, in add_hooks_info 'add_info' ](self, ui) apport/ general- hooks/ubuntu. py", line 34, in add_info cloud_info( report) apport/ general- hooks/ubuntu. py", line 323, in add_cloud_info 'ami'):
ERROR: hook /usr/share/
Traceback (most recent call last):
File "/usr/lib/
symb[
File "/usr/share/
add_
File "/usr/share/
if ami and ami.startswith(
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
The fix to this as-yet- python- 3-illiterate looks like:
--- /usr/share/ apport/ general- hooks/ubuntu. py.dist 2012-06-27 19:45:13.332342429 +0000 apport/ general- hooks/ubuntu. py 2012-06-27 19:45:26.340342116 +0000 metadata_ url, 'ami-id')
+++ /usr/share/
@@ -316,7 +316,7 @@
ami_id_url = urljoin(
try: ami_id_ url, timeout=5)).read()
- ami = urlopen(ami_id_url, timeout=5).read()
+ ami = str(urlopen(
except:
ami = None
ProblemType: Bug ature: User Name 3.5.0-2.2-generic 3.5.0-rc4 ture: all
DistroRelease: Ubuntu 12.10
Package: apport 2.2.5-0ubuntu1
ProcVersionSign
Uname: Linux 3.5.0-2-generic x86_64
Architecture: amd64
Date: Wed Jun 27 19:32:56 2012
PackageArchitec
ProcEnviron:
TERM=screen
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)