Partial from Code not working
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 550, in run_
return self.run(edit, **args)
File "RailsPartial in /Users/marcinadamczyk/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 36, in run
File "RailsPartial in /Users/marcinadamczyk/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 47, in get_selected_text
File "RailsPartial in /Users/marcinadamczyk/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 96, in create_partial_file
UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' in position 981: ordinal not in range(128)
After selecting code, pressing ALT+P, typing in name of new partial, it creates a partial, but empty. It doesnt remove code from original file, just creates the file.
Thanks for bringing this to my attention!
What type of file are you using this in? Also, what is the code being selected? Anything out of the ordinary?
I found an error. If I select £ I get this error.
purchase less than £5,000
I have the same issue. If I select any accentuation chars (like Anúncios) it doesn't work (exact behavior as described by OP).
The error in the log is:
Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 568, in run_ return self.run(edit, **args) File "RailsPartial in /Users/feliperaul/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 36, in run File "RailsPartial in /Users/feliperaul/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 47, in get_selected_text File "RailsPartial in /Users/feliperaul/Library/Application Support/Sublime Text 3/Installed Packages/Rails Partial.sublime-package", line 96, in create_partial_file UnicodeEncodeError: 'ascii' codec can't encode character '\xfa' in position 112: ordinal not in range(128)
If I select any other code it works fine.