Sublime Text 2 / sublimeLinter: only Python is real-time background linted - sublimetext2

I've already spent a few hour on this with not much progress. I'm running Sublime Text 2.0.2 with SublimeLinter v1.7 [1]. It real-time lints Python beautifully, but for many of the other languages I use day-to-day [Javascript, Ruby, CSS/SCSS, etc] it will only display badly-formated warnings via the console when saving[2]. I've tried a number of settings for the executable map. I current have:
"sublimelinter_executable_map":
{
"javascript": "/usr/local/bin/node",
"node": "/usr/local/bin/node"
},
I've also had just "javascript": "/usr/local/bin/node" in there as well. I've also tried using both jshint and jslint as the "javascript_linter" option.
The console shows SublimeLinter loading and enabling javascript, CSS and Ruby (using node, ruby and node, respectively).
After the enable message on the console I get:
Traceback (most recent call last):
File "./SublimeLinter.py", line 431, in _update_view
File "./SublimeLinter.py", line 143, in run_once
File "./sublimelinter/modules/base_linter.py", line 291, in run
File "./sublimelinter/modules/javascript.py", line 72, in parse_errors
ValueError: Error from jslint: util.puts: Use console.log instead
also:
SublimeLinter: css enabled (using node.js)
Traceback (most recent call last):
File "./SublimeLinter.py", line 431, in _update_view
File "./SublimeLinter.py", line 143, in run_once
File "./sublimelinter/modules/base_linter.py", line 291, in run
File "./sublimelinter/modules/css.py", line 24, in parse_errors
ValueError: Error from csslint: util.puts: Use console.log instead
This is followed by raw linting messages such as:
[{"id":"(error)","raw":"Use spaces, not tabs.","evidence":"\t\"published\":
\"#444444\",","line":4,"character":1,"reason":"Use spaces, not tabs."},{"id":"
(error)","raw":"Expected '{a}' at column {b}, not column
{c}.","evidence":"\t\"published\":
[1] As per https://github.com/SublimeLinter/SublimeLinter/issues/512 I rolled back to v1.7 to get PEP8 linting working.
[2] Coffeescript gets real-time linting, which is nice.

Apparently this has been fixed in Sublime 3:
https://github.com/SublimeLinter/SublimeLinter-for-ST2/issues/560

Related

Invalid command name "::tk::dialog::file::"

I'm trying to open a simple file open dialog in Tcl/Tk but whenever I run tk_getOpenFile I get the following error:
invalid command name "::tk::dialog::file::"
while executing
"::tk::dialog::file:: open {*}$args"
(procedure "tk_getOpenFile" line 5)
invoked from within
"tk_getOpenFile"
(procedure "open" line 2)
invoked from within
...
I'm running the latest version of Tcl/Tk, 8.6.9, from the Arch Linux repositories. What could be causing this?
It looks like a broken installation somehow. The procedure tk_getOpenFile in …/tk.tcl (where … is where Tk's library files are installed) delegates to the procedure ::tk::dialog::file:: in …/tkfbox.tcl (yes, an unusual procedure name), but that doesn't seem to be working in your case. Either the file is missing, or the tclIndex file in the same directory is broken. (That's using an old mechanism for auto-loading of code that doesn't really make sense for new code to use in… well, in this millennium. It's kept for backward compatibility.)

Very odd Cordova/Phonegap JSON error: Unexpected token in JSON at position 0

So i've been developing an app for the past few weeks. I have never messed with any json file whatsoever. Today I tried to run my app and it shows a very odd error from Cordova, Error:
Error: Unexpected token in JSON at position 0
The token is ' '?
Which JSON file is it? I went over all the main Json package files, and all of them started with the 0'th token as a '{'.
I'm completely lost, I didn't do anything at all, I didn't add a plugin or something that day it just appeared out of no where.
I have no idea which json files to attach here, there are dozens of them in the project directory.. Any ideas or direction will be extremely helpful, thanks.
Check plugins/*.json
There's most likely an issue hiding in one of those files.
For me it was an unresolved merge conflict inside fetch.json
Run npm install and it will give you more details of the error. In my case, it was an extra comma in package.json. It is a painful bug and I wish cordova explicitly mentioned where this issue was!
You had to check the file fetch.json in Plugins folder. Fetch.json must be encode in UTF8 and at the end of the JSON, the file need to finish correctly, without a comma, like this :
{
"es6-promise-plugin": {
"source": {
"type": "registry",
"id": "es6-promise-plugin#^4.1.0"
},
"is_top_level": false,
"variables": {}
},
"cordova-plugin-nativestorage": {
"source": {
"type": "registry",
"id": "cordova-plugin-nativestorage#^2.3.2"
},
"is_top_level": true,
"variables": {}
} //No Comma
}
Good luck !
My approach to any JSON error:
[optional] Remove/uninstall all plugins
Delete all your platform directory folders (ie. browser, Android, iOS etc,), and delete the package.json file
Note: Don't delete the package-lock.json file
Create a new package.json file by running npm init on your command line (run this command on your Cordova project directory).
Make sure you create this file with the same package name you used before. If you don't remember, you can check the config.xml file (including the 'version').
Reinstall all your plugins (if you followed step 1).
Add your platforms.
Run, build your Cordova project.
If it fails, follow step 1 to the last step.
It works 100℅
If this doesn't work, contact me and send me your issues.

Execute RubyEval in sublime looks nothing happened

macos 10.9.5
sublime version is 2.0.2
SublimeRubyEval not works for me.
execute RubyEval in sublime looks nothing happend.
check console find out (ctrl + `):
Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./RubyEval.py", line 69, in run
File "./RubyEval.py", line 50, in eval_as_ruby
TypeError: str() takes at most 1 argument (2 given)
I fixed it. works for me.
https://github.com/jugyo/SublimeRubyEval/pull/8
BTW: Use jugyo / SublimeRubyEval is easiest way to genrate some text (like repeat html) in the sublime edit view. Other things like SublimeREPL those are too heavy to do that.

PyCUDA: "import pycuda.gl as cuda_gl", how to find pycuda.gl?

everyone. Recently I am learning pyCUDA. When I execute the "SobelFilter.py" example in SDK, I get the error as follows.
File "SobelFilter.py", line 31, in <module>
import pycuda.gl as cuda_gl
File "/usr/local/lib/python2.7/dist-packages/pycuda-2011.1.2-py2.7-linux-i686.egg/pycuda/gl/__init__.py", line 4, in <module>
raise ImportError("PyCUDA was compiled without GL extension support")
ImportError: PyCUDA was compiled without GL extension support
So can anyone help to solve it? I am new to pyCUDA, and last time Ely helped me a lot. I hope he can see it this time again.
The Error says: PyCUDA was compiled without GL extension support.
How did you compile PyCUDA ? which OS ? do You have the opengl-dev packages ?
Rebuild PyCUDA with
CUDA_ENABLE_GL = True
in siteconf.py

Why does a file checked into CVS become double-spaced?

Problem
Frequently (but not every time) when using CVS to check in files like: .java, .cs, .xml, etc, every line of the file is gets a carriage return.
Example:
File before check-in by a team member:
// Begin file
class Foo
{
public Foo()
{
// Do step 1
// Do step 2
}
}
// End file
File when checked out by a team member:
// Begin file
class Foo
{
public Foo()
{
// Do step 1
// Do step 2
}
}
// End file
Development Environment
NetBeans 6.8 and now 6.9 (the problem occurred when using 6.8 as well).
Visual Studio 2008 and 2010.
Repository: CVS; checkins and checkouts done from Cygwin bash shell.
Operating system: Widows XP Professional.
What I Have Tried
I tried changing the value: build.compiler.emacs=true within NetBeans under Tools->Options, thinking this might be causing some kind of Unix/Windows translation problem when checking in? This made no difference.
Am I missing something about what happens to a file when it gets checked into CVS in a Windows/IDE/Cygwin stack that can cause this problem?
Something is converting DOS line breaks (CR LF) to pairs of Unix line breaks (just LF). I would personally bet on its being CVS. You might want to try using TortoiseCVS instead of Cygwin CVS.
A Windwos-native CVS client will convert MS-DOS line endings in a text file (\r\n) to Unix-style line endings when submitting the file to the server, so that in the repository, the files are maintained in a 'canonical' form with \n representing a line ending. When Windows native client will also convert the line ending when bringing a file down from the server.
However, I believe that the default Cygwin CVS client acts like a Unix client and assumes that no line ending conversion is required. So if you use that client to check in a file with MS-DOS-style endings (\r\n), you'll get this kind of confusion.
It looks like the people who are using the Cygwin client are using tools that care converting the files to MS-DOS style line endings (or something is).
A potential fix is to uninstall the Cygwin CVS client and install the WinCVS client on your Windows/Cygwin boxes so the Windows native client will be used even when a Cygwin shell is active:
http://www.dehora.net/journal/2003/07/a_fix_for_cygwin_and_cvs_linefeeds.html
Another possibility to to configure your Cygwin mounts under a specific mode (but I'm not really familiar enough with Cygwin to know how well this works or if it might introduce otehr problems - it's been a long time since I've tried using Cygwin):
http://www.gigascale.org/softdevel/faq/23.html
Another possibility that I just ran into - if the file was saved in Unicode format but stored in CVS as ASCII/Text, extra line terminators will be added.