colinta / SublimeStringEncode

Converts characters from one "encoding" to another using a transformation (think HTML entities, not character encodings)
Other
150 stars 22 forks source link

'module' object has no attribute 'parse' #19

Closed gzzz closed 9 years ago

gzzz commented 9 years ago

Url Encode, URL Decode:

AttributeError: 'module' object has no attribute 'parse'
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 362, in run_
  File ".\string_encode.py", line 17, in run
  File ".\string_encode.py", line 125, in encode
AttributeError: 'module' object has no attribute 'parse'
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 362, in run_
  File ".\string_encode.py", line 17, in run
  File ".\string_encode.py", line 130, in encode
AttributeError: 'module' object has no attribute 'parse'

urllib.parse.quote and urllib.parse.unquote must be urllib.quote and urllib.unquote.

And i think urllib.quote_plus(text) is better than urllib.quote(text).replace('/', '%2F'), in this way urllib.unquote(text)urllib.unquote_plus(text).

colinta commented 9 years ago

Heads up, you're using ST2... always useful information to plugin authors :smile: