 At the top of your exploit.py file, add the missing import: import urllib.parse  