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

Base64 Errors #13

Closed jshall closed 10 years ago

jshall commented 10 years ago

Each Base64 command fails. I'm guessing that base64_decode fails because the base64 module returns bytes rather than a string and that base64_encode fails because the base64 module expects bytes rather than the string provided.

base64_decode

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "string_encode in C:\Users\jshall\AppData\Roaming\Sublime Text 3\Installed Packages\StringEncode.sublime-package", line 18, in run
  File "C:\Program Files\Sublime Text 3\sublime.py", line 659, in replace
    sublime_api.view_replace(self.view_id, edit.edit_token, r, text)
TypeError: String required

base64_encode

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "string_encode in C:\Users\jshall\AppData\Roaming\Sublime Text 3\Installed Packages\StringEncode.sublime-package", line 17, in run
  File "string_encode in C:\Users\jshall\AppData\Roaming\Sublime Text 3\Installed Packages\StringEncode.sublime-package", line 135, in encode
  File "X/base64.py", line 58, in b64encode
TypeError: expected bytes, not str