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

AttributeError: 'str' object has no attribute 'decode' #43

Open
siemiatj opened this issue Dec 3, 2018 · 1 comment
Open

AttributeError: 'str' object has no attribute 'decode' #43

siemiatj opened this issue Dec 3, 2018 · 1 comment

Comments

@siemiatj
Copy link

siemiatj commented Dec 3, 2018

When trying to run any command, I'm getting this :

JavaScript Refactor.Refactor.sublime-settings
node
error: b'\nundefined:1534\n    throw new JS_Parse_Error(message, filename, line, col, pos);\n    ^\nError\n    at new JS_Parse_Error (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1526:18)\n    at js_error (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1534:11)\n    at croak (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2026:9)\n    at token_error (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2034:9)\n    at unexpected (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2040:9)\n    at semicolon (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2060:56)\n    at simple_statement (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2240:73)\n    at eval (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2113:19)\n    at eval (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2073:24)\n    at eval (eval at <anonymous> (/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/js/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:2827:23)\n'
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1072, in run_
    return self.run(edit)
  File "/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/Refactor.py", line 171, in run
    self.RenamevariableCommand(edit)
  File "/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/Refactor.py", line 181, in RenamevariableCommand
    self.executeNodeJsShell(cmd)
  File "/Users/sasklacz/Library/Application Support/Sublime Text 3/Packages/JavaScript Refactor/Refactor.py", line 54, in executeNodeJsShell
    return result.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

Sublime 3.1.1, build 3176, OSX El Capitan.

@morissonmaciel
Copy link

Same issue is happing when trying to refactor an JSX based Rect Component and trying to rename a simple constant as coded below:

export const CustomCellStyle = `
	border-bottom-color: rgb(192, 192, 192);
	border-bottom-style: solid;
	border-bottom-width: 1px;
	border-right-color: rgb(192, 192, 192);
	border-right-style: solid;
	border-right-width: 1px;
	color: rgb(0, 0, 0);
	display: table-cell;
	font-size: 12px;
	width: 141px;
`;

Sublime 3.2.1, Build 3207, OSX Mojave

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