atom-community / atom-community/ide-python

Error when starting Atom from terminal

オープン
#189 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
238
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`atom .` で Atom を起動して失敗を再現し、`python/lib/utils.js` と `python/lib/main.js` 付近の ide-python のスタックエントリ、特に `detectPipEnv` を調べます。ターミナルとデスクトップの起動環境を比較します。完了の条件は、ターミナルからの起動で `spawn ENOTDIR` が発生しなくなり、仮想環境のパッケージが引き続き利用できることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, python
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。