[12:04] spiv: ok, thanks for look at it :-) [12:04] people, good night [12:07] daf? [12:12] limi|busy? === limi|busy might have figured it out ;) [12:12] give me 20 seconds, and we'll know [12:13] Module canonical.rosetta.browser, line 75, in products [12:13] total = product.messageCount() [12:13] ForbiddenAttribute: ('messageCount', latest merges from rocketfuel [12:14] re-built DB [12:14] daf: this is when accessing the GNOME project in Rosetta [12:15] bah [12:16] can you give the complete last line of the error message? [12:16] yes [12:16] Module zope.tal.talinterpreter, line 311, in interpret [12:16] handlers[opcode] (self, args) [12:16] Module zope.tal.talinterpreter, line 723, in do_loop_tal [12:16] iterator = self.engine.setRepeat(name, expr) [12:16] Module zope.tales.tales, line 687, in setRepeat [12:16] it = self._engine.iteratorFactory(name, expr, self) [12:16] Module zope.tales.tales, line 109, in __init__ [12:16] self._next = i.next() [12:16] Module canonical.rosetta.browser, line 75, in products [12:16] total = product.messageCount() [12:16] ForbiddenAttribute: ('messageCount', > [12:17] ) [12:17] :) [12:17] hmm [12:36] daf: any idea what it could be? [12:43] a bug? [12:50] Gah. [12:50] I don't understand it [12:50] SteveA: Around? [12:51] spiv: I suspect not, given his timezone [12:51] daf: Ah, ok. I've no idea what time it is anywhere anymore ;) [12:51] time zones are for wimps [12:52] spiv: :) [12:53] limi|busy: ah, I think I see what's going on [12:53] ok === limi|busy rearranges Stuff [12:54] limi|busy: in lib/canonical/rosetta/browser.py [12:54] daf: Anyway, I *may* have found the cause of carlos's bug. [12:55] spiv: the mystery of the missing END? [12:55] daf: do continue ;) [12:55] the suspense is killing me [12:55] ;) [12:55] --- orig/lib/canonical/rosetta/browser.py [12:56] +++ orig/lib/canonical/rosetta/browser.py [12:56] there's a conflict that got merged? [12:56] @@ -58,3 +58,3 @@ [12:57] person = IPerson(self.request.principal, None) [12:58] if person is not None: [12:58] daf, the manual diffing machine [12:58] for language in person.languages(): [12:58] - yield LanguageProducts(language, self.context.products) === daf gives up [12:58] remove that line and... [12:59] add this one: [12:59] yield LanguageProducts(language, self.context.rosettaProducts) [01:00] well, give that a try and see if it fixes it [01:00] testing === mdz [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad [01:00] oh, Friday [01:00] lovely Friday [01:02] daf: same error [01:02] or; similar [01:03] Module zope.tales.tales, line 109, in __init__ [01:03] self._next = i.next() [01:03] Module canonical.rosetta.browser, line 75, in products [01:03] total = product.messageCount() [01:03] ForbiddenAttribute: ('messageCount', ) === limi|busy still wonders why nobody else sees these [01:03] hmmm === elmo [~james@83.216.141.215] has joined #launchpad [01:11] limi|busy: I'm trying to reproduce this error locally [01:11] ok === limi|busy goes back to the prefs form tweaking [01:21] daf: Yep, I definitely know why carlos's thiing isn't being committed. [01:21] daf: What I don't know is what the right way to fix that is :) === spiv goes to think about it over dinner [01:24] spiv: another sqlobject/slos bug? [01:44] carlos does insane things to ZPT at times :] [01:48] daf: any idea where the actual language list is coming from? [01:49] ie. which file is it in? [01:50] or does it grab it from the system? [02:03] daf: ping? :) [02:03] spiv? [02:04] :) [02:04] anyone? :] === limi|busy feels alone [02:04] limi|busy: from the database [02:04] sorry, got distracted [02:04] daf: aha [02:04] anyway [02:04] I have a more complex question ;) [02:05] eek! [02:05] how can I get the languages the logged-in person has? [02:05] I didn't quite understand what kind of structure carlos was using in the dashboard [02:05] um [02:05] the "select your languages" part [02:05] should be something like [02:05] request/lp:person/languages === limi|busy tests [02:06] grep around for something like that; I think it's used in at least one template already [02:07] Module zope.interface.interface, line 684, in __call__ [02:07] raise TypeError("Could not adapt", obj, self) [02:07] TypeError: ('Could not adapt', , ) [02:07] nothing greppable that I can find :( [02:08] bah, that error again === limi|busy gets some litchi [02:11] hmm [02:11] you know that error you had before? [02:12] oh well, I can leave it for carlos to sort it out [02:12] yes? [02:12] what does line 65 of your browser.py say? [02:13] yield LanguageProducts(language, self.context.products) [02:13] change to rosettaProducts? [02:13] what line did you change before? [02:13] 58 [02:14] aha [02:14] ok, both lines 58 and 65 should read ".rosettaProducts()" instead of ".products" [02:14] ok [02:15] and why is it only me that has this problem? :) === limi|busy feels singled out [02:15] :] [02:15] I didn't get it because I was not up-to-date, I think [02:16] or because I wasn't looking at that page [02:16] ok :) [02:16] or because the moon is Waning Gibbous [02:16] well, it's just the project page, it's not like it's important or anything O:) [02:16] :) [02:17] that language list in the DB is on crack, btw [02:17] 70% of it is dead/unused languages [02:17] :] [02:19] daf: almost: [02:19] Module zope.tales.tales, line 109, in __init__ [02:19] self._next = i.next() [02:19] Module canonical.rosetta.browser, line 74, in products [02:19] for product in self._products: [02:19] TypeError: iteration over non-sequence [02:19] ;) [02:19] wtf? [02:19] that is *so* a sequence [02:19] haha [02:19] not _rosettaProducts? [02:20] try slapping a list() around self.context.rosettaProducts() [02:20] ok [02:20] both lines? [02:20] aye === limi|busy feels like the Java days again [02:21] typecasting all over the place ;) [02:22] haha :) [02:22] same error [02:22] humph [02:25] Works For Me [02:26] Doesn't Help [02:26] ;) === daf scratches his head [02:27] try rebuilding your database [02:27] "make -C database/schema launchpad_test", IIRC [02:29] I did that after I updated last, but... === limi|busy tries again [02:30] and you did restart Launchpad, right? [02:31] yes [02:31] then you *are* being singled out :) [02:32] hehe [02:32] Module zope.tales.tales, line 109, in __init__ [02:32] self._next = i.next() [02:32] Module canonical.rosetta.browser, line 65, in languageProducts [02:32] yield LanguageProducts(language, list(self.context.rosettaProducts)) [02:32] TypeError: iteration over non-sequenc [02:33] still no worky [02:33] you missed out the () [02:33] ? [02:33] rosettaProducts() [02:33] aha [02:34] if you add the (), you can probably get rid of the list() [02:34] (both of them) [02:34] yes, did that ;) [02:35] daf: what's a "temporal hack", btw? is that where you get 25 hours in a day? [02:35] :) [02:35] O:) [02:35] :D [02:35] I think that's Carlosspeak for "temporary hack" :) [02:35] hehe === limi|busy is no longer singled out! [02:36] limi has gone mainstream :) === limi|busy breaks Rosetta 0.2s later: [02:37] Module zope.app.publication.publicationtraverse, line 57, in traverseName [02:37] ob2 = adapter.publishTraverse(request, nm) [02:37] Module canonical.metazcml, line 148, in publishTraverse [02:37] traversed_to = getattr(self.context, self._getter)(name) [02:37] ForbiddenAttribute: ('product', ) [02:37] when clicking a product in GNOME project page === limi|busy adds some UI porn instead [02:39] oh, bloody ForbiddenAttributes [02:42] bah, file system full >:-| [02:43] ouch [02:43] Filesystem Size Used Avail Use% Mounted on [02:43] /dev/hda2 24G 22G 0 100% / [02:44] um, isn't there 2G missing there? [02:46] depends how it counts it [02:46] there's always block slack [02:46] if you have lots of small files, that may be a correct number [02:46] I know, but it's annoying when you're desparately looking around for free space [02:47] get rid of some mp3s :] [02:48] eek! [03:31] the Avail and the Use% indicate userspace on the disk [03:31] there's a bit reserved for root [03:33] daf: it doesn't count space which is reserved for root [03:33] by default 5% [03:33] so 1G and change in your case [03:40] mdz: interesting, thanks [03:41] mdz: this is something which can be configured, right? [03:41] daf: yes [03:41] daf: tune2fs -l /dev/hda2 to view it [03:41] tune2fs -m /dev/hda2 to change it [03:41] groovy [03:42] can this be changed on a mounted filesystem? [03:42] it's probably not dangerous to do so, but it wouldn't take effect until the filesystem was remounted [03:43] hmm, df is reporting the change immediately [04:14] !dmwaters:*! hi all! I'm going to wake everyone up a bit.:) I need to switch out one main rotation server for another. basically, replacing an old box with a new one.:) this won't take long. 1800 users affected. === spiv [~andrew@fuchsia.puzzling.org] has joined #launchpad === SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad [04:21] that seems plausible [04:21] I wouldn't expect it to be enforced yet, though, but I suppose it's possible [04:27] we shall see :) === mdz_ [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad === mdz_ is now known as mdz [06:43] SteveA: I'm off to bed now, so just a quick note that BrowserPublication defines two different beforeTraversal methods! [07:29] !lilo:*! So, it occurs to me to wonder what the maximum practical latency between participants in a peer-directed project might be: http://www.reuters.com/newsArticle.jhtml?type=scienceNews&storyID=6133976&src=eDialog/GetContent§ion=news [09:16] thanks! [09:16] I'll fix that === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad [11:10] morning [11:32] morning [11:32] spiv found the database error [11:32] I'd introduced a bug when I merged in the auth changes [11:32] there are two beforeTraversal methods defined in BrowserPublication [11:40] SteveA: then, it's already fixed? [11:57] I don't believe anything is checked in yet [11:57] but, I also just read andrew's note about a bug in sqlobject joins === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad === carlos_ [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad === carlos_ is now known as carlos [12:54] SteveA: I'm having a problem with this page https://rosetta.warthogs.hbd.com/rosetta/prefs [12:55] SteveA: if I select only a entry from "Available languages", the request gives me something like: availablelanguages: itemSelected [12:56] but If I select more than one, I get something like: availablelanguages: u'item1', u'item2', u'item3' [12:57] and when I try to iterate over all values, it does not work as it should [12:57] because in the first case, it itereates over all letters instead of just retrieve the value [01:09] ok, that sounds like what I'd expect it to do [01:09] when there is more than one, what kind of object is it? [01:10] you can also change the code in the page template to say availablelanguages:list rather than just availablelanguages [01:10] like: [01:10] [01:12] change that to contain name="availablelanguages:list" [01:12] ok [01:12] oh, wait... [01:12] you want "selectedLanguages" not "availableLangauges" dont' you? [01:13] I want both [01:13] well, all in lower [01:13] yes [01:13] I don't know how what I suggested would interact with the fancy javascript [01:13] so, better to handle this in your form-processing method [01:13] the add submit gets the available, the remove submit gets the selected [01:14] test the type of availablelanguages [01:14] well, in fact, I don't know why, but the javascript is not working anymore here [01:14] isinstance(availablelanguages, list) [01:14] but that's another problem [01:15] SteveA: is there any way to do the javascript magic without submit it? [01:15] or just ignoring it is enough? [01:15] I don't know exactly what you mean [01:15] with the limi's code, we have three submit buttons [01:15] let's solve your original problem first [01:15] one to save and two for add/remove [01:15] ok [01:16] can you try to use isinstance(availablelanguages, list) to see if it is a string or a list? [01:18] SteveA: ok, it works [01:19] great [01:20] now, on stopping buttons from submitting [01:20] you need to ensure the javascipt returns false [01:20] that should stop them from hitting the server [01:20] but, it looks like it does that already [01:20] and it's fixed now [01:20] if isinstance(self.request.form['availablelanguages'] , list): [01:20] newLanguages = self.request.form['availablelanguages'] [01:20] else: [01:20] newLanguages = [ self.request.form['availablelanguages'] ] [01:20] for englishName in newLanguages: === limi [~limi@159.80-202-72.nextgentel.com] has joined #launchpad [01:21] okay [01:21] SteveA: hmm, I think I was wrong the add/remove button should submit always because if the languages are not selected the request does not have the list of items... [01:21] limi: hey [01:22] limi: I'm broking your templates :-P [01:22] hehe [01:22] but then, I don't understand the utility of the javascript... [01:22] limi: if the submit buttons work, the javascript has any utility? [01:23] I mean, Is it useful? [01:23] what do you mean? [01:24] limi: in my local machine, the javascript code has not effect anymore and I just changed the template so the list of selected languages is filled with user's preferences [01:24] /s/just/only/ [01:25] from the template, from browser.py I changed lot of things [01:25] you probably changed the variable names, right? [01:27] I must go out and buy some optician stuff. probably get some lunch too. back later. [01:28] limi: only the browser.py ones, not the javascript ones or the html objects ones [01:28] SteveA: later [01:29] limi: my changes: [01:29]
- tal:define="languages view/languages"> [01:29] + tal:define="languages view/languages; selectedLanguages view/selectedLanguages" > [01:29] -
[01:29] + [01:29] - [01:29] + [01:29] +