atom-community / atom-community/ide-python

Error when starting Atom from terminal

Open
#189 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
238
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Hey,
I have the follow error when opening atom from the terminal with `atom .`
Once atom is opened, every time a open a python module I get the error.
```
internal/child_process.js:358 Uncaught (in promise) Error: spawn ENOTDIR
at ChildProcess.spawn (internal/child_process.js:358)
at Object.spawn (child_process.js:543)
at resolve (/home/somnium/.atom/…thon/lib/utils.js:9)
at new Promise ()
at detectPipEnv (/home/somnium/.atom/…thon/lib/utils.js:8)
at PythonLanguageClient.startServerProcess (/home/somnium/.atom/…thon/lib/main.js:50)
at PythonLanguageClient. (auto-languageclient.ts:298)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at process.reportBusyWhile (auto-languageclient.ts:298)
at AtomIdeProvider. (atom-ide-provider.js? [sm]:7)
at Generator.next ()
at step (/home/somnium/.atom/…m-ide-provider.js:9)
at /home/somnium/.atom/…m-ide-provider.js:9
at new Promise ()
at AtomIdeProvider. (/home/somnium/.atom/…m-ide-provider.js:9)
at Object.reportBusyWhile (index.js? [sm]:33)
at PythonLanguageClient. (auto-languageclient.ts:798)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at PythonLanguageClient.AutoLanguageClient.reportBusyWhile (auto-languageclient.ts:796)
at PythonLanguageClient. (auto-languageclient.ts:296)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at PythonLanguageClient.startServer (auto-languageclient.ts:295)
at ServerManager._serverManager.server_manager_js_1.ServerManager [as _startServer] (auto-languageclient.ts:253)
at ServerManager. (server-manager.ts:155)
at Generator.next ()
at /home/somnium/.atom/…server-manager.js:7
at new Promise ()
internal/child_process.js:358 Uncaught (in promise) Error: spawn ENOTDIR
at ChildProcess.spawn (internal/child_process.js:358)
at Object.spawn (child_process.js:543)
at resolve (/home/somnium/.atom/…thon/lib/utils.js:9)
at new Promise ()
at detectPipEnv (/home/somnium/.atom/…thon/lib/utils.js:8)
at PythonLanguageClient.startServerProcess (/home/somnium/.atom/…thon/lib/main.js:50)
at PythonLanguageClient. (auto-languageclient.ts:298)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at process.reportBusyWhile (auto-languageclient.ts:298)
at AtomIdeProvider. (atom-ide-provider.js? [sm]:7)
at Generator.next ()
at step (/home/somnium/.atom/…m-ide-provider.js:9)
at /home/somnium/.atom/…m-ide-provider.js:9
at new Promise ()
at AtomIdeProvider. (/home/somnium/.atom/…m-ide-provider.js:9)
at Object.reportBusyWhile (index.js? [sm]:33)
at PythonLanguageClient. (auto-languageclient.ts:798)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at PythonLanguageClient.AutoLanguageClient.reportBusyWhile (auto-languageclient.ts:796)
at PythonLanguageClient. (auto-languageclient.ts:296)
at Generator.next ()
at /home/somnium/.atom/…languageclient.js:7
at new Promise ()
at __awaiter (/home/somnium/.atom/…languageclient.js:3)
at PythonLanguageClient.startServer (auto-languageclient.ts:295)
at ServerManager._serverManager.server_manager_js_1.ServerManager [as _startServer] (auto-languageclient.ts:253)
at ServerManager. (server-manager.ts:155)
at Generator.next ()
at /home/somnium/.atom/…server-manager.js:7
at new Promise ()
```

Everything works if I'm starting Atom from _desktop icon_, however I need to be able to running it from the terminal.
When running `sudo atom .` it works, but I don't get my virtual env installed packages available which makes it impossible to use some other atom plugins features.

My setup:
OS: Ubuntu 18
Atom: 1.42
ide-python: 1.5.0

Any help is welcome.
Thanks

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by launching Atom with `atom .`, then inspect the ide-python stack entries around `python/lib/utils.js` and `python/lib/main.js`, especially `detectPipEnv`. Compare the terminal and desktop launch environments; done means terminal startup no longer produces `spawn ENOTDIR` and virtual-environment packages remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.