SublimeText / CoffeeScript

Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.
440 stars 64 forks source link

Blank after save in watch mode #191

Closed richarddong closed 9 years ago

richarddong commented 10 years ago

first time switch into watch mode:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeUglifyCommand object at 0x10614cc10>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeUglifyCommand object at 0x10614cc10>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeRunCommand object at 0x10614cd50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeRunCommand object at 0x10614cd50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeRunArgumentsCommand object at 0x10614ccd0>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeRunArgumentsCommand object at 0x10614ccd0>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeDrunCommand object at 0x10614c910>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeDrunCommand object at 0x10614c910>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeDrunArgumentsCommand object at 0x106122b50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeDrunArgumentsCommand object at 0x106122b50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmCommand object at 0x10614c990>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmCommand object at 0x10614c990>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmSearchCommand object at 0x10614cdd0>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmSearchCommand object at 0x10614cdd0>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmInstallCommand object at 0x10614cf50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmInstallCommand object at 0x10614cf50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmUninstallCommand object at 0x10614ce50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmUninstallCommand object at 0x10614ce50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmUpdateCommand object at 0x10614cb90>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmUpdateCommand object at 0x10614cb90>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmListCommand object at 0x10614c950>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmListCommand object at 0x10614c950>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmPublishCommand object at 0x10614cc50>)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 445, in is_enabled_
    raise ValueError("is_enabled must return a bool", self)
ValueError: ('is_enabled must return a bool', <Nodejs.Nodejs.NodeNpmPublishCommand object at 0x10614cc50>)
Now watching order.coffee

now i get the correct answer.

but after save or modify:

Reloading /var/folders/tr/v78gyct950qbrrtztqclzg880000gp/T/order.js
Writing file /Users/develop/develop/Projects/citic-trade/order.coffee with encoding UTF-8 (atomic)
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 255, in on_post_save
    callback.on_post_save(v)
  File "CoffeeScript in /Users/develop/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 621, in on_post_save
  File "CoffeeScript in /Users/develop/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 527, in refresh
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1409-1410: ordinal not in range(128)
Reloading /var/folders/tr/v78gyct950qbrrtztqclzg880000gp/T/order.js

the panel goes blank

please help :pray:

markalfred commented 10 years ago

You have some unicode characters in your order.coffee file at positions 1409 and 1410. Type this in the console:

view.rowcol(1409)

and it'll give you the row and column right above* the offending characters.

* It returns the row above because it's returning the 0-based row/col, whereas ST displays 1-based rows.

richarddong commented 10 years ago

So sublime-better-coffeescript does not support unicode in CoffeeScript? This should be a bug, right?

markalfred commented 9 years ago

Haha, good call @richarddong. Thanks for the bug report :+1:

richarddong commented 9 years ago

:smile: