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

Autocomplete-python error #22

Closed
ghost opened this issue Jun 25, 2015 · 9 comments
Closed

Autocomplete-python error #22

ghost opened this issue Jun 25, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Jun 25, 2015

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.211.0
System: Unknown Windows Version
Thrown From: autocomplete-python package, v0.4.3

Stack Trace

Failed to activate the autocomplete-python package

At spawn UNKNOWN

Error: spawn UNKNOWN
    at exports._errnoException (util.js:734:11)
    at ChildProcess.spawn (child_process.js:1145:11)
    at Object.exports.spawn (child_process.js:977:9)
    at new module.exports.constructor (C:\Users\dmit1_000\.atom\packages\autocomplete-python\lib\provider.coffee:44:48)
    at Object.module.exports.activate (C:\Users\dmit1_000\.atom\packages\autocomplete-python\lib\main.coffee:52:23)
    at Package.module.exports.Package.activateNow (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:240:19)
    at C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:221:30
    at Package.module.exports.Package.measure (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:165:15)
    at Package.module.exports.Package.activate (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:213:14)
    at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package-manager.js:452:21)

Commands

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ],
    "autoHideMenuBar": true,
    "disabledPackages": [
      "highlight-line"
    ]
  },
  "autocomplete-python": {}
}

Installed Packages

# User
atom-material-syntax, v0.1.1
atom-material-ui, v0.4.7
autocomplete-python, v0.4.3
file-icons, v1.5.8
linter, v1.0.4
linter-flake8, v1.4.2

# Dev
No dev packages
@sadovnychyi
Copy link
Member

Do you have python installed and available?

@ghost
Copy link
Author

ghost commented Jun 25, 2015

Yes, sure, I have.
My path: C:\Python34;C:\Python34\scripts;C:\Users\dmit1_000\AppData\Local\atom\bin;C:\Python34\Lib\site-packages\django\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;in\

@sadovnychyi
Copy link
Member

Hmm, Can I ask you to try it with one possible fix? Open the provider file at

C:\Users\dmit1_000\.atom\packages\autocomplete-python\lib\provider.coffee

and replace python on line 49 to python.exe.

Old:

    @provider = require('child_process').spawn(
      'python', [__dirname + '/completion.py'], env: env)

New:

    @provider = require('child_process').spawn(
      'python.exe', [__dirname + '/completion.py'], env: env)

I have no idea if it will with the problem, but worth to try. I don't have windows right now to test it by myself.

@sadovnychyi
Copy link
Member

And you have to restart your Atom after the change, of course.

@ghost
Copy link
Author

ghost commented Jun 25, 2015

I did it, but I have the same problem.

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.211.0
System: Unknown Windows Version
Thrown From: autocomplete-python package, v0.4.3

Stack Trace

Failed to activate the autocomplete-python package

At spawn UNKNOWN

Error: spawn UNKNOWN
  at exports._errnoException (util.js:734:11)
  at ChildProcess.spawn (child_process.js:1145:11)
  at Object.exports.spawn (child_process.js:977:9)
  at new module.exports.constructor (C:\Users\dmit1_000\.atom\packages\autocomplete-python\lib\provider.coffee:48:42)
  at Object.module.exports.activate (C:\Users\dmit1_000\.atom\packages\autocomplete-python\lib\main.coffee:45:33)
  at Package.module.exports.Package.activateNow (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:240:19)
  at C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:221:30
  at Package.module.exports.Package.measure (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:165:15)
  at Package.module.exports.Package.activate (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package.js:213:14)
  at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package-manager.js:452:21)
  at C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package-manager.js:436:29
  at Config.module.exports.Config.transact (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\config.js:311:16)
  at PackageManager.module.exports.PackageManager.activatePackages (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package-manager.js:431:19)
  at PackageManager.module.exports.PackageManager.activate (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\package-manager.js:412:46)
  at Atom.module.exports.Atom.startEditorWindow (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\atom.js:641:21)
  at Object.<anonymous> (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-bootstrap.js:12:8)
  at Object.<anonymous> (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-bootstrap.js:23:4)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (C:\Users\dmit1_000\AppData\Local\atom\app-0.211.0\resources\app.asar\src\babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at setupWindow (file:///C:/Users/dmit1_000/AppData/Local/atom/app-0.211.0/resources/app.asar/static/index.js:95:23)
  at window.onload (file:///C:/Users/dmit1_000/AppData/Local/atom/app-0.211.0/resources/app.asar/static/index.js:36:7)

Commands

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ],
    "autoHideMenuBar": true,
    "disabledPackages": [
      "highlight-line"
    ]
  },
  "autocomplete-python": {}
}

Installed Packages

# User
atom-material-syntax, v0.1.1
atom-material-ui, v0.4.7
autocomplete-python, v0.4.3
file-icons, v1.5.8
linter, v1.0.4
linter-flake8, v1.4.2

# Dev
No dev packages

@sadovnychyi
Copy link
Member

Hm, thanks for trying. I will try to reproduce it by myself.

@ghost
Copy link
Author

ghost commented Jun 25, 2015

Okay, I will wait

@sadovnychyi
Copy link
Member

Another possible solution from stackoverflow:

Check if you have "Run this program as an administrator" selected on your python.exe. If you do, try to unselect it.

http://stackoverflow.com/questions/30809808/node-webkit-child-spawn-unknown-error

@ghost
Copy link
Author

ghost commented Jun 25, 2015

Oh, it is working! Idiotic selector. I had problems with linter and other packages and it all solved together! 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

1 participant