ActiveState Community

RunAndNotify

Posted by benzineb on 2009-06-23 02:46

Hi,

I love Komodo!

I've assembled a small Macro from bit's and pieces I've found on the forums. Basically I have a command wich calls a local file wich uploads a copy of the file I'm working on to a remote server.

I call the local file with RunAndNotify and every now and than I get the following error:

Error while running in macro save remotely:

: TypeError: int() argument must be a string or a number, not 'NoneType'

exception[name] = 
exception[message] = TypeError: int() argument must be a string or a number, not 'NoneType'
exception[QueryInterface] = function QueryInterface() {
    [native code]
}
exception[result] = 2147500037
exception[filename] = null
exception[lineNumber] = 0
exception[columnNumber] = 0
exception[location] = null
exception[inner] = null
exception[data] = null

Here's my code:

try{
		komodo.assertMacroVersion(2);
		if (komodo.view) {
			komodo.view.setFocus();
		};
		komodo.doCommand('cmd_save');
		var root='/Applications/xampp/xamppfiles/htdocs/';
		var dPath=String(ko.views.manager.currentView.document.displayPath);
		var path=dPath.split(root)[1].split('/');
		var cwd=root+path[0];
		path.shift();
		var dir=path.join('/');
		var file = komodo.interpolate('%F');
		var php = komodo.interpolate('%(php)');
		var cmd=php+" -f remote.php "+file+" "+dir;
		var runPhp = Components.classes["@activestate.com/koRunService;1"].createInstance(Components.interfaces.koIRunService);
		var process = runPhp.RunAndNotify(cmd, cwd, '', '');
		var retval = process.wait(-1); // wait till the process is done
		if (retval == 0) {
		    StatusBar_AddMessage("remote.php: " + process.getStdout(), "editor", 2000, true);  
		}else{
			StatusBar_AddMessage("remote.php: " + process.getStdout(), "editor", 2000, true);
		}
	}catch(e) { alert(e); }

Tnx!

toddw | Tue, 2009-06-23 11:17

It's hard to be sure on what is occurring there. The next time this occurs, can you save the Komodo log files:
http://community.activestate.com/faq/komodo-file-locations#log_files

and then create a new Komodo bug, attaching these log files:
http://bugs.activestate.com/enter_bug.cgi?product=komodo

Thanks,
Todd