Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Uncaught SyntaxError: Unexpected token #6

Open
eddyLazar opened this issue Apr 14, 2015 · 2 comments
Open

Uncaught SyntaxError: Unexpected token #6

eddyLazar opened this issue Apr 14, 2015 · 2 comments

Comments

@eddyLazar
Copy link

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.190.0
System: Mac OS X 10.10.2
Thrown From: autocomplete-plus-python-jedi package, v0.2.6

Stack Trace

Uncaught SyntaxError: Unexpected token �

At file:///Users/eddy/Downloads/Atom.app/Contents/Resources/app/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Feddy%2Fsrc%2Fpython%2Fclubhillel%22%7D%5D%2C%22bootstrapScript%22%3A%22%2FUsers%2Feddy%2FDownloads%2FAtom.app%2FContents%2FResources%2Fapp%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2FUsers%2Feddy%2FDownloads%2FAtom.app%2FContents%2FResources%2Fapp%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22apiPreviewMode%22%3Afalse%2C%22appVersion%22%3A%220.190.0%22%2C%22shellLoadTime%22%3A248%2C%22initialPaths%22%3A%5B%22%2FUsers%2Feddy%2Fsrc%2Fpython%2Fclubhillel%22%5D%7D:1

SyntaxError: Unexpected token �
  at Object.parse (native)
  at JediProvider.processData (/Users/eddy/.atom/packages/autocomplete-plus-python-jedi/lib/jedi-provider.coffee:71:15)
  at Interface.<anonymous> (/Users/eddy/.atom/packages/autocomplete-plus-python-jedi/lib/jedi-provider.coffee:51:32)
  at emitOne (events.js:77:13)
  at Interface.emit (events.js:166:7)
  at Interface._onLine (readline.js:195:10)
  at Interface.<anonymous> (readline.js:325:12)
  at Array.forEach (native)
  at Interface._normalWrite (readline.js:324:11)
  at Socket.ondata (readline.js:71:10)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:166:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:109:10)
  at Pipe.onread (net.js:517:20)

Commands

     -0:19.0 editor:newline (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:17.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:06.1 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused.autocomplete-active)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "monokai"
    ],
    "disabledPackages": [
      "linter-pylint"
    ]
  }
}

Installed Packages

# User
atom-django, v0.2.1
atom-html-preview, v0.1.6
atom-jade, v0.1.0
autocomplete-plus, v2.9.0
autocomplete-plus-python-jedi, v0.2.6
file-icons, v1.5.4
language-jade, v0.3.0
language-python-django-templates, v0.1.0
linter, v0.12.0
linter-pyflakes, v0.0.4
monokai, v0.14.0
python-jedi, v0.1.9
run-in-browser, v0.1.3
set-syntax, v0.2.1
web-browser, v1.4.4

# Dev
No dev packages
@tinloaf
Copy link
Owner

tinloaf commented Apr 15, 2015

That is weird. Are you able to reproduce this, i.e. does this happen in the same file all the time or the like?

@posita
Copy link

posita commented Apr 23, 2015

I am able to reproduce this reliably on OS X with a virtualenv activated before invoking Atom from the command line (I have not tested without a virtualenv since I don't have jedi installed system-wide):

% cd ~
% rm -fr ~/.atom/.compile-cache
% virtualenv ~/testjedi
...
% source ~/testjedi/bin/activate
% .../atom.sh

Wait for Atom to come up, then create a new file foo.py and type:

import time
time.strf

No Jedi popup should appear at first. Switch apps (i.e., take focus away from Atom and go to, e.g., the Finder). After about 30-60 seconds on my machine, I get the following:

screen shot 2015-04-23 at 07 43 33

Clicking the View Issue button takes me to #10.

I cannot reproduce this reliably without removing ~/.atom/compile-cache first (although sometimes it does happen). This might be related to #11. I do not see persistent processes once this package is completely loaded and functioning. However, if I quit Atom before I see a Jedi popup, the jedi-cmd.py process remains.

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

No branches or pull requests

3 participants