Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SublimeText3 TypeError: can't concat bytes to str #32

Closed
justgook opened this issue May 10, 2013 · 5 comments
Closed

SublimeText3 TypeError: can't concat bytes to str #32

justgook opened this issue May 10, 2013 · 5 comments

Comments

@justgook
Copy link

Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 531, in run_
return self.run(edit)
File "/.config/sublime-text-3/Installed Packages/Indent XML.sublime-package/indentxml.py", line 44, in run
File "
/.config/sublime-text-3/Installed Packages/Indent XML.sublime-package/indentxml.py", line 77, in indent
File "~/.config/sublime-text-3/Installed Packages/Indent XML.sublime-package/indentxml.py", line 100, in indent
TypeError: can't concat bytes to str

@TheChrisPratt
Copy link

I'm seeing this in Sublime Text 3 as well. The plugin works awesome under Sublime Text 2, but blows up in ST3.

Traceback (most recent call last):
  File "E:\Development\Sublime Text 3\sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "C:\Users\Chris\AppData\Roaming\Sublime Text 3\Packages\sublimetext_indentxml\indentxml.py", line 49, in run
    s = self.indent(s)
  File "C:\Users\Chris\AppData\Roaming\Sublime Text 3\Packages\sublimetext_indentxml\indentxml.py", line 100, in indent
    s = xmlheader.group() + "\n" + s
TypeError: can't concat bytes to str

But, I found that changing line 100 to:

                s = xmlheader.group().decode("utf-8") + "\n" + s

fixes the problem.
(Chris)

@jamesstout
Copy link

@TheChrisPratt - thanks this fixed it for me.

@dickinsonjl
Copy link

@TheChrisPratt fixed the issue for me too 👍

@ghost
Copy link

ghost commented Jul 13, 2013

Oh, I didn't see that there was already a commit linked to this issue. Why isn't it merged already?

@alek-sys
Copy link
Owner

Because I'm busy as a bee :) Sorry, merged now - seems to be working fine in both ST2 / ST3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants