pull-debian-source fails with "ImportError: No module named request"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-dev-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
On Eoan with ubuntu-dev-tools 0.171
$ /usr/bin/
Traceback (most recent call last):
File "/usr/bin/
import urllib.request
ImportError: No module named request
Root cause: despite the "/usr/bin/python3" shebang in the source, setuptools modifies this to "/usr/bin/python" because setup.py ran with Python 2 during the build, and so the "build" pull-debian-source tool no longer works.
I'm not sure how to fix this while moving towards Python 3 without porting everything else or making pull-debian-source (and incrementally everything else until the porting is done) dual 2/3.
Workaround: hack your /usr/bin/
This bug is my fault. I had assumed that testing pull-debian-source by running it straight from the source tree would be sufficient when I ported it to Python 3 in the process of fixing a different bug.
tags: | added: eoan |
Changed in ubuntu-dev-tools (Ubuntu): | |
status: | Triaged → Fix Committed |
02:11 <ScottK> Pretty sure you can turn off shebang rewriting. I think it's dh_python, not setuptools.