bh / atom-python-isort

Atom.io plugin to sort Python imports
https://atom.io/packages/python-isort
MIT License
19 stars 10 forks source link

Uncaught TypeError: Cannot read property 'getPath' of undefined #8

Open matthewryanscott opened 9 years ago

matthewryanscott commented 9 years ago

[Enter steps to reproduce below:]

  1. Open Atom
  2. Open Settings tab

Atom Version: 0.179.0 System: Mac OS X 10.10.2 Thrown From: python-isort package, v0.0.5

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /Users/fg/.atom/packages/python-isort/lib/python-isort.coffee:38

TypeError: Cannot read property 'getPath' of undefined
  at PythonIsort.module.exports.PythonIsort.getFilePath (/Users/fg/.atom/packages/python-isort/lib/python-isort.coffee:38:18)
  at PythonIsort.module.exports.PythonIsort.checkForUnsortedImports (/Users/fg/.atom/packages/python-isort/lib/python-isort.coffee:41:16)
  at /Users/fg/.atom/packages/python-isort/lib/index.coffee:34:16
  at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:977:19)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:620:26)
  at Object.module.exports.autosavePaneItem (/Applications/Atom.app/Contents/Resources/app/node_modules/autosave/lib/autosave.js:56:80)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/autosave/lib/autosave.js:27:26
  at atom-pane.PaneElement.activeItemChanged (/Applications/Atom.app/Contents/Resources/app/src/pane-element.js:125:25)
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:264:22)
  at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:328:21)
  at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:524:16
  at _fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:794:54)
  at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:823:30)
  at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:756:13)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:817:14
  at flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:110:17)
  at process._tickCallback (node.js:364:11)

Commands

     -0:09.0 core:move-up (atom-text-editor.editor)
 31x -0:08.9 core:move-right (atom-text-editor.editor)
     -0:06.2 editor:select-to-first-character-of-line (atom-text-editor.editor)
     -0:04.4 core:move-down (atom-text-editor.editor)
 18x -0:04.3 core:move-right (atom-text-editor.editor)
     -0:02.0 editor:select-to-first-character-of-line (atom-text-editor.editor)
     -0:00.9 settings-view:open (atom-text-editor.editor)

Config

{
  "core": {},
  "python-isort": {
    "isortPath": "/Users/fg/.virtualenvs/isort/bin/isort"
  }
}

Installed Packages

# User
block-cursor, v0.7.5
cucumber, v0.4.0
ember-cli-helper, v0.4.0
ember-snippets, v1.0.0
emmet, v2.3.3
language-python-django-templates, v0.1.0
linter-flake8, v1.2.0
minimap, v3.4.9
python-isort, v0.0.5
react, v0.9.8

# Dev
No dev packages