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

UnicodeEncodeError #73

Open
bogkonstantin opened this issue Jun 14, 2017 · 3 comments
Open

UnicodeEncodeError #73

bogkonstantin opened this issue Jun 14, 2017 · 3 comments

Comments

@bogkonstantin
Copy link

Today I have an issue:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 56-58: ordinal not in range(128)

Traceback (most recent call last):
File "Path to Sublime\sublime_plugin.py", line 818, in run_
return self.run(edit)
File "Path to Sublime\Data\Packages\View In Browser\ViewInBrowserCommand.py", line 202, in run
pluginSettings = self.loadPluginSettings(browser)
File "Path to Sublime\Data\Packages\View In Browser\ViewInBrowserCommand.py", line 177, in loadPluginSettings
result["baseCommand"] = self.getBaseCommand(selectedOs[platform][result["browser"]], osName)
File "Path to Sublime\Data\Packages\View In Browser\ViewInBrowserCommand.py", line 85, in getBaseCommand
baseCommand = self.expandWindowsUserShellFolder(baseCommand)
File "Path to Sublime\Data\Packages\View In Browser\ViewInBrowserCommand.py", line 67, in expandWindowsUserShellFolder
windowsFolders = self.getWindowsUserShellFolders()
File "Path to Sublime\Data\Packages\View In Browser\ViewInBrowserCommand.py", line 138, in getWindowsUserShellFolders
return_dict[name] = value.encode("ascii")

My solution (it works well in my case):
In file ViewInBrowserCommand.py", line 138:
Change to:
return_dict[name] = value.encode("ascii", "ignore")

@godlike0108
Copy link

I have same issue. But there is no ViewInBrowserCommand.py such file in my computer.

Traceback (most recent call last):
File "D:\Program Files\Sublime Text 3\sublime_plugin.py", line 812, in run_
return self.run(edit, **args)
File "ViewInBrowserCommand in D:\Program Files\Sublime Text 3\Data\Installed Packages\View In Browser.sublime-package", line 201, in run
File "ViewInBrowserCommand in D:\Program Files\Sublime Text 3\Data\Installed Packages\View In Browser.sublime-package", line 176, in loadPluginSettings
File "ViewInBrowserCommand in D:\Program Files\Sublime Text 3\Data\Installed Packages\View In Browser.sublime-package", line 85, in getBaseCommand
File "ViewInBrowserCommand in D:\Program Files\Sublime Text 3\Data\Installed Packages\View In Browser.sublime-package", line 67, in expandWindowsUserShellFolder
File "ViewInBrowserCommand in D:\Program Files\Sublime Text 3\Data\Installed Packages\View In Browser.sublime-package", line 137, in getWindowsUserShellFolders
UnicodeEncodeError: 'ascii' codec can't encode characters in position 24-25: ordinal not in range(128)

Need help...

@bogkonstantin
Copy link
Author

@godlike0108 use this to extract package files:
https://github.com/skuroda/PackageResourceViewer

@godlike0108
Copy link

@bogkonstantin Wow that works! Thanks!!

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

2 participants