Ah, yes, I had reinstalled all the Simile plugins to no avail. But your suggestion prompted me to ask myself: what about plugin conflicts? So I removed all the (fortunately few) plugins in the broken system which were not in the working one. The culprit: what amounts to another scraping plugin: McAfee SiteAdvisor, a program which tries to detect phishing sites. Disable that and my problem goes away. Re-enable it and the problem comes back.
Should I document this on the Developer's list or will it find its way there by itself from this list? Bob Morris On 10/16/07, Stefano Mazzocchi <[EMAIL PROTECTED]> wrote: > Bob Morris wrote: > > On one, but not another, of two Windows XP machines the problem below > > about argument types arises. I am so new to Simile that I don't even > > know how to move the successful case to the other machine to get some > > clues about what might be different in the two environments, nor could > > I think of any (but unsuccessful, naive ) archive search strings to > > find any other occurrences. The problem: > > > > With Solvent, I make a small piece of javascript (below) and try to > > run it with the Solvent code window Run button. Something---I suppose > > it must be PiggyBank---raises an alert whose text is: > > Error: There is no method > > edu.mit.simile.piggyBank.WorkingModel.addStatement that matches > > JavaScript argument types (undefined, undefined, undefined, > > undefined). Candidate methods with the same name are: void > > addStatement(java.lang.String,java.lang.String,java.lang.String,boolean) > > > > It's perfectly clear to me what this message means. It's opaque what I > > should do to look for a cause. Both Firefox installations are current, > > both systems have JRE1.5 > > It *feels* like the java and javascript subsystems of piggy bank are > misaligned in version. > > Have you tried uninstalling and re-installing the misbehaving piggy > bank? (don't worry, your data won't be removed). > > > Thanks for any guidance. > > Bob Morris > > ========== > > generated code: > > > > > > var rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; > > var dc = 'http://purl.org/dc/elements/1.1/'; > > > > var namespace = document.documentElement.namespaceURI; > > var nsResolver = namespace ? function(prefix) { > > return (prefix == 'x') ? namespace : null; > > } : null; > > > > var getNode = function(document, contextNode, xpath, nsResolver) { > > return document.evaluate(xpath, contextNode, nsResolver, > > XPathResult.ANY_TYPE,null).iterateNext(); > > } > > > > var cleanString = function(s) { > > return utilities.trimString(s); > > } > > > > var xpath = '//[EMAIL PROTECTED]"rmp_table"]/tbody/tr'; > > var elements = utilities.gatherElementsOnXPath(document, document, > > xpath, nsResolver); > > for each (var element in elements) { > > // element.style.backgroundColor = 'red'; > > > > var uri = 'http://simile.mit.edu/ns#Item'; // generate the item's URI here > > > > data.addStatement(uri, rdf + 'type', > > 'http://simile.mit.edu/ns#Unknown', false); // Use your own type here > > // log('Scraping URI ' + uri); > > > > try { > > data.addStatement(uri, 'http://Course', > > cleanString(getNode(document, element, './TD[2]/text()[1]', > > nsResolver).nodeValue), true); > > } catch (e) { log(e); } > > > > } > > > > > > > > > -- > Stefano. > > _______________________________________________ > General mailing list > [email protected] > http://simile.mit.edu/mailman/listinfo/general > -- Robert A. Morris Professor of Computer Science UMASS-Boston [EMAIL PROTECTED] http://bdei.cs.umb.edu/ http://www.cs.umb.edu/~ram http://www.cs.umb.edu/~ram/calendar.html phone (+1)617 287 6466 _______________________________________________ General mailing list [email protected] http://simile.mit.edu/mailman/listinfo/general
