Rhino 9 WIP Python 3 Error: module 'urllib' has no attribute 'parse'

Hi Guys,

Been trying to test DKUI in Rhino 9 WIP and get this error on PY3 components:

AttributeError: module ‘urllib’ has no attribute ‘parse’

import urllib

save_name = urllib2.parse.quote_plus("string with spaces that need to be URL quoted") 

print (save_name)

It appears that urllib is not being imported at all.

Cheers

DK

OK, this change has fixed the issue:

import urllib.parse

save_name = urllib2.parse.quote_plus("string with spaces that need to be URL quoted") 

print (save_name)

Maybe that is just better practice anyway.

Cheers

DK

Look at that, very nice!

1 Like