Error: spawn UNKNOWN
at exports._errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:399:9)
at file:///C:/Users/Gates/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:237:13
at Promise._execute (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\debuggability.js:303:9)
at Promise._resolveFromExecutor (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:483:18)
at new Promise (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:79:10)
at HybridExecutable.Executable.spawn (file:///C:/Users/Gates/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:234:16)
at file:///C:/Users/Gates/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:166:10
at tryCatcher (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10)
at Async.drainQueues (C:\Users\Gates\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14)
"*":
"atom-beautify":
executables:
autopep8:
path: "c:\\python27\\lib\\site-packages\\autopep8.py"
isort:
path: "c:\\python27\\lib\\site-packages\\isort.py"
python:
beautify_on_save: true
sort_imports: true
core:
telemetryConsent: "no"
editor:
fontSize: 12
"exception-reporting":
userId: "b1cb00d4-b947-4bb9-80b2-cccedc43937f"
welcome:
showOnStartup: false
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.
Please follow the issue template provided. More specifically, adding a link to the required debug.md Gist which includes debugging information that answers our most commonly asked questions.
Thank you.
@nwschurink I see in https://github.com/atom/atom/issues/16689 you are also experiencing this issue. Please comment here with your debug.md Gist so we can help: https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md#how-to-create-debugmd-gist
@Glavin001 Thanks for referring here. The link to my debug Gist is:
https://gist.github.com/nwschurink/bd394228ad65e6a0c3fe4462fec2c70d
Do you need any more information or is a link to the problem description in atom/atom#16689 sufficient for you?
From your logs:
2018-02-06T10:19:53.305Z - debug: [] spawn D:\Anaconda3\Scripts\isort-script.py 0=--version
2018-02-06T10:19:53.306Z - debug: [] error Error: spawn UNKNOWN
And your config is:
{
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"beautify_on_save": true,
"sort_imports": true,
"max_line_length": 79,
"ignore": [
"E24"
],
"formater": "autopep8",
"style_config": "pep8",
"multi_line_output": "Hanging Grid Grouped",
"disabled": false,
"default_beautifier": "autopep8"
}
And the applicable lines of code which call isort:
https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/autopep8.coffee#L57-L60
I think if you disable sort_imports this issue will be resolved.
Do you have isort installed or would like to install it such that you can sort_imports?
I disabled the isort functionality, however I receive the same error message (spawn UNKNOWN)
I have uploaded the debug file after setting sort imports to false:
https://gist.github.com/nwschurink/7f79dbcf76bf31af75d7e91aafac3135
As for whether I have isort installed the answer is yes. Running ">where isort" from cmd I get:
C:\Python27\Scriptsisort.exe
C:\Users\n.schurink\AppData\Local\Programs\Python\Python36\Scriptsisort.exe
Also I have the files isort.exe and isort-script.py in the folder D:\Anaconda3\Scripts\
Atom-Beautify thinks isort is installed at D:\Anaconda3\Scripts\isort-script.py
Could you try configuring isort Executable option from the Atom-Beautify package settings view? https://github.com/Glavin001/atom-beautify/blob/master/docs/options.md#isort
Hi Glavin001, I changed the options to their python36 paths.
I.e. autopep8 -> C:\Users\n.schurink\AppData\Local\Programs\Python\Python36\Scripts\autopep8.exe
isort -> C:\Users\n.schurink\AppData\Local\Programs\Python\Python36\Scriptsisort.exe
The error message has been resolved this way and the program seems to work!
Thanks alot!
Great to hear!!
I will keep this experience in mind. Unibeautify will have a completely rewritten implementation of Beautifiers and Executables. I will try to make this more user friendly. Thanks for your interest!
I encounter the same error message.
I am not using isort and/or sort imports.
This is the stacktrace I am getting:
Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:371:11)
at spawn (child_process.js:558:9)
at file:///C:/Users/Ares/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:238:13
at Promise._execute (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\debuggability.js:384:9)
at Promise._resolveFromExecutor (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:518:18)
at new Promise (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:103:10)
at HybridExecutable.Executable.spawn (file:///C:/Users/Ares/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:235:12)
at file:///C:/Users/Ares/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:167:10
at tryCatcher (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:102:5)
at Async.drainQueues (C:\Users\Ares\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:15:14)
This is the gist.md.
Most helpful comment
Hi Glavin001, I changed the options to their python36 paths.
I.e. autopep8 -> C:\Users\n.schurink\AppData\Local\Programs\Python\Python36\Scripts\autopep8.exe
isort -> C:\Users\n.schurink\AppData\Local\Programs\Python\Python36\Scriptsisort.exe
The error message has been resolved this way and the program seems to work!
Thanks alot!