urllib.urlencode() does not exist for python3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restfulclient |
Fix Released
|
High
|
Colin Watson | ||
lazr.restfulclient (Ubuntu) |
Fix Released
|
High
|
Colin Watson |
Bug Description
This is similar to bug 1414055, but now for urlencode:
Traceback (most recent call last):
File "apport/
t = b.bug_tasks[0]
File "/usr/lib/
found_slice = self._get_
File "/usr/lib/
self.
File "/usr/lib/
uri.query = urllib.
AttributeError: 'module' object has no attribute 'urlencode'
I suggest something like
if sys.version_
from urllib import urlencode
else:
from urllib.parse import urlencode
and use urlencode() without namespace.
Related branches
Changed in lazr.restfulclient (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in lazr.restfulclient (Ubuntu): | |
status: | New → Fix Committed |
Changed in lazr.restfulclient (Ubuntu): | |
assignee: | Dimitri John Ledkov (xnox) → Colin Watson (cjwatson) |
Changed in lazr.restfulclient: | |
assignee: | nobody → Colin Watson (cjwatson) |
status: | New → Fix Committed |
importance: | Undecided → High |
Changed in lazr.restfulclient (Ubuntu): | |
importance: | Undecided → High |
This bug was fixed in the package lazr.restfulclient - 0.13.4-5ubuntu1
---------------
lazr.restfulclient (0.13.4-5ubuntu1) xenial; urgency=medium
* Cherry-pick from upstream:
- Update imports for urlencode (thanks, Dimitri John Ledkov;
LP: #1425609).
-- Colin Watson <email address hidden> Tue, 19 Apr 2016 10:25:38 +0100