[Bug 1414055] Re: urllib.unquote() does not exist in Python 3, causes crash

Launchpad Bug Tracker 1414055 at bugs.launchpad.net
Sat Jan 31 11:39:55 UTC 2015


** Branch linked: lp:~xnox/lazr.restfulclient/lp1414055

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lazr.restfulclient in Ubuntu.
https://bugs.launchpad.net/bugs/1414055

Title:
  urllib.unquote() does not exist in Python 3, causes crash

Status in lazr.restfulclient package in Ubuntu:
  In Progress

Bug description:
  While porting Apport to python3-launchpadlib, I stumbled over

  Traceback (most recent call last):
    File "apport/crashdb_impl/launchpad.py", line 1245, in test_1_download
      r = self.crashdb.download(self.get_segv_report())
    File "apport/crashdb_impl/launchpad.py", line 318, in download
      for attachment in filter_filename(b.attachments):
    File "apport/crashdb_impl/launchpad.py", line 46, in filter_filename
      f = attachment.data.open()
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 426, in open
      return HostedFileBuffer(self, mode, content_type, filename)
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 1085, in __init__
      filename = urllib.unquote(path.split("/")[-1])
  AttributeError: 'module' object has no attribute 'unquote'

  In Python 3, this is urllib.parse.unquote(), thus this needs a
  conditional import.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: python3-lazr.restfulclient 0.13.4-3
  ProcVersionSignature: Ubuntu 3.18.0-9.10-generic 3.18.2
  Uname: Linux 3.18.0-9-generic x86_64
  ApportVersion: 2.15.1-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 23 16:50:18 2015
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2014-11-20 (64 days ago)
  InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20141119)
  PackageArchitecture: all
  SourcePackage: lazr.restfulclient
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lazr.restfulclient/+bug/1414055/+subscriptions



More information about the foundations-bugs mailing list