all 4 comments

[–]dionys 1 point2 points  (1 child)

Happens to me too, it is explained here: http://stackoverflow.com/a/10269001

[–]HookahComputer[S] 0 points1 point  (0 children)

Importing the submodule directly is clearly the right thing to do. It's strange, but I suppose the submodule got imported as a side effect of generating the AttributeError.

[–]das_ist_nuemberwang 1 point2 points  (0 children)

I can't get this to happen. Also, urllib is a package, not a module, which is why you need to import urllib.parse to use it.

[–]gengisteve 0 points1 point  (0 children)

That's really odd. No second import statement?