python 3.2 error saying urllib.parse.urlencode() is not defined

You’re not showing the imports in your program, so I can’t be sure, but I bet you did

import urllib

which will not import and re-export the separate module urllib.parse. Do

import urllib.parse

instead.

(import urllib is rather senseless in Python 3.x, since all the functionality is in the submodules and these are not imported by the toplevel module.)

Leave a Comment

tech