Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Uncaught ReferenceError: path is not defined #3

Closed
hvdklauw opened this issue Jul 26, 2016 · 1 comment
Closed

Uncaught ReferenceError: path is not defined #3

hvdklauw opened this issue Jul 26, 2016 · 1 comment
Labels

Comments

@hvdklauw
Copy link

[Enter steps to reproduce below:]

  1. Open a python file with unsorted imports
  2. Save it

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: atom-isort package, v1.2.0

Stack Trace

Uncaught ReferenceError: path is not defined

At /Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:1002

ReferenceError: path is not defined
    at AtomIsort.module.exports.AtomIsort.applySubstitutions (/Users/harro/.atom/packages/atom-isort/lib/atom-isort.coffee:36:42)
    at AtomIsort.module.exports.AtomIsort.runIsort (/Users/harro/.atom/packages/atom-isort/lib/atom-isort.coffee:46:18)
    at AtomIsort.module.exports.AtomIsort.checkImports (/Users/harro/.atom/packages/atom-isort/lib/atom-isort.coffee:29:6)
    at /Users/harro/.atom/packages/atom-isort/lib/index.coffee:42:55
    at Function.module.exports.Emitter.simpleDispatch (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1113:27)
    at TextBuffer.module.exports.TextBuffer.save (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1083:19)
    at TextEditor.module.exports.TextEditor.save (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:660:26)
    at Pane.module.exports.Pane.saveItem (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:718:18)
    at Pane.module.exports.Pane.saveActiveItem (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:701:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:684:35)
    at atom-workspace.commandRegistry.add.core:save (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:214:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Users/harro/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:43.1.0 autocomplete-python:go-to-definition (atom-text-editor.editor.is-focused)
     -0:30.9.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.seti-compact.seti-roboto.seti-animate.theme-monokai-seti.theme-seti-ui)
  2x -0:30.7.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.seti-compact.seti-roboto.seti-animate.theme-monokai-seti.theme-seti-ui)
     -0:02.3.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "linter-pylint",
      "wrap-guide",
      "pigments",
      "linter-pydocstyle"
    ],
    "themes": [
      "seti-ui",
      "monokai-seti"
    ]
  },
  "atom-isort": {
    "isortPath": "/Users/harro/virtualenvs/zupr-p3/bin/isort"
  }
}

Installed Packages

# User
MagicPython, v0.5.13
Sublime-Style-Column-Selection, v1.5.1
atom-beautify, v0.29.10
atom-django, v0.3.2
atom-isort, v1.2.0
autoclose-html, v0.23.0
autocomplete-python, v1.8.4
copy-path, v0.4.0
custom-title, v1.0.1
django-templates, v0.5.0
editorconfig, v1.4.1
file-icons, v1.7.17
highlight-line, v0.11.1
highlight-selected, v0.11.2
indent-guide-improved, v1.4.9
javascript-snippets, v1.2.1
language-babel, v2.32.1
language-restructuredtext, v1.0.0
language-rst, v0.2.1-0
linter, v1.11.14
linter-csslint, v1.3.2
linter-eslint, v7.2.4
linter-flake8, v1.13.2
linter-htmlhint, v1.2.1
linter-jscs, v4.0.5
linter-jsxhint, v0.1.2
linter-php, v1.2.0
minimap, v4.24.7
monokai-seti, v0.7.0
multi-wrap-guide, v0.25.1
navigation-history, v0.1.8
pdf-view, v0.50.0
project-manager, v2.9.7
redux-snippets, v0.2.2
seti-ui, v1.3.1
synced-sidebar, v0.4.3

# Dev
No dev packages
@lexicalunit
Copy link
Owner

Thanks for the report! I've resolved the issue in release v1.2.1. 👍

This project could really use some spec tests to prevent an error like this from happening again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants