[12:03] postgres statement logging is too late -- the query never reaches postgres. [12:04] The simplest way would be to insert a print just before the relevant line in zope.app.rdb, -- what's the fnal part of the traceback? === elmo [~james@83.216.141.215] has joined #launchpad [12:07] * Module canonical.rosetta.sql, line 678, in createMessageSetFromText [12:07] return createMessageSetFromText(self, text) [12:07] * Module canonical.rosetta.sql, line 291, in createMessageSetFromText [12:07] if messageIDs.count() == 0: [12:07] * Module sqlobject.main, line 1211, in count [12:07] count = self.accumulate('COUNT(*)') [12:07] * Module sqlobject.main, line 1207, in accumulate [12:07] return conn.accumulateSelect(self,expression) [12:07] * Module sqlobject.dbconnection, line 249, in accumulateSelect [12:07] val = int(self.queryOne(q)[0] ) [12:07] * Module sqlobject.dbconnection, line 223, in queryOne [12:07] return self._runWithConnection(self._queryOne, s) [12:07] * Module sqlos.adapter, line 60, in _runWithConnection [12:07] raise DatabaseException, tuple(exc.args) [12:08] DatabaseException: unindexable object [12:09] Actually, turning on debug in SQLObject would be sufficient. [12:10] could you remind me how I do that? [12:10] Except the current sqlos seems to override that :/ [12:10] sqlobject/dbconnection.py is what I edit. [12:11] You may need to remove self.debug = 0 from sqlos/adapter.py, too. [12:18] [12:18] 1/Pool : ACQUIRE pool=[] [12:18] 1/QueryOne: SELECT COUNT(*) FROM POMsgID WHERE msgid = 'Opening %%d contact will open %%d new window as well.\r\nDo you really want to display this contact?' [12:18] 1/Pool : RELEASE (implicit, autocommit=None) pool=[] [12:18] but, also: [12:18] 1/Pool : ACQUIRE pool=[] [12:18] 1/QueryOne: SELECT COUNT(*) FROM POMsgID WHERE msgid = 'Opening %d contact will open %d new window as well.\r\nDo you really want to display this contact?' [12:18] 1/Pool : RELEASE (implicit, autocommit=None) pool=[] [12:22] Also? Weird. [12:22] The second one fails I presume? [12:22] I presume so too [12:22] :) [12:26] ah, think I've found the second one [12:35] spiv: ok, I think I've sorted out the SELECTs [12:35] spiv: now an INSERT is being a pain [12:36] spiv: shouldn't this stuff be automatically escaped in SQLObject? [12:36] Probably, yes. [12:37] is it difficult to fix? [12:37] (Which has the added suck that fixing it in SQLObject will break our code thatwe're writing now that assumes the fix isn't there) [12:37] i.e. should I do a workaround, or wait for it to be fixed properly? [12:37] is it only a problem with percent signs? [12:38] speaking of the Rosetta code, there's not much code which is affected [12:40] I'd workaround it. [12:40] ok, I know how to hack SELECTS to work [12:40] (man, my wireless is screwing up for some reason) [12:40] how do I do the same for INSERTs? [12:44] Yes, it's only % -- it's because Python's printf-like formatting is being invoked. [12:44] right [12:45] it is a bug, right? === limi [~limi@sparkit.easynet.no] has joined #launchpad [12:47] (i.e. psycopg's cursor.execute does query % params ) [12:48] (sorry about the lag -- my wireless keeps dropping out for no apparent reason) [12:48] You'd fix it for INSERTs the same way -- escape % as %% in any strings. [12:49] using which method? [12:50] foo.replace('%', '%%') [12:50] How are you donig it for SELECTS? :) [12:50] Class.select() [12:51] I've always used Class(...) for insertions previously [12:53] Um, I think we're talking at cross-purposes. [12:54] You can do Class(foo=foo.replace('%', '%%')) [12:54] ok, that's what I wanted to know [12:54] sorry, I'm tired [12:54] And you can do Class.selectBy(foo=foo.replace('%', '%%')) [12:55] oh, right === limi [~limi@sparkit.easynet.no] has joined #launchpad === limi [~limi@sparkit.easynet.no] has joined #launchpad === limi [~limi@sparkit.easynet.no] has joined #launchpad === elmo [~james@83.216.141.215] has joined #launchpad === lalo [~lalo@200-203-033-222.paemt7005.dsl.brasiltelecom.net.br] has joined #launchpad === stub [~zen@dialup-31.81.220.203.acc05-dryb-mel.comindico.com.au] has joined #launchpad === elmo_ [~james@83.216.141.215] has joined #launchpad === elmo_ [~james@83.216.141.215] has joined #launchpad === wartylog [~warthylog@port1845.ds1-khk.adsl.cybercity.dk] has joined #launchpad === Topic for #launchpad: how's england? wet but soon, I will go back to Wales and how will wales be? probably wet, too === Topic (#launchpad): set by kiko at Fri Aug 27 16:07:21 2004 === limi is now known as ltr|imil === ltr|imil is now known as limi === mdz [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad