=== lalo [~lalo@200-096-114-111.paemt7014.dsl.brasiltelecom.net.br] has joined #launchpad === limi|food is now known as limi === stub [~zen@203.220.53.14] has joined #launchpad === lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad [12:48] morning [12:48] daf: We should solve the case when a language does not have a default plural form [12:49] carlos: yes [12:53] daf: any idea of the procedure to do it?, do we have it defined? [12:54] what do you mean "solve"? [12:54] daf: http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/translate [12:54] fails [12:55] because welsh does not have plural forms [12:55] right [12:55] I have an idea for it [12:56] phone [12:56] carlos: I have a solutions for the language selection widget [01:05] limi: good!! [01:05] daf: Could you share it? :-) [01:05] limi: Do I need to change my code? [01:05] already checked in, and sending mail to the list now [01:05] no [01:06] ok [01:06] mail sent [01:06] please test the code === limi is in a hurry [01:07] carlos: well, error reporting in the translation template needs to be better in general [01:07] I shouldn't really be here ;) [01:07] plane leaves in 3 hours [01:08] limi: downloading [01:08] daf: I know :-) [01:08] for now, the view class should set a flag for this error, and the template should check for it [01:09] and it should work similarly for other errors [01:09] limi: not yet at rocketfuel... [01:10] daf: make sense [01:17] SteveA, spiv: The database updated is not working, with the SteveA's patch seems to work better but the commit is never done === limi [~limi@159.80-202-72.nextgentel.com] has left #launchpad [] [01:30] is the commit never done for any query? [01:32] SteveA: the log does not have any COMMIT [01:33] is this try for all queries, or just some? [01:34] SteveA: I did a grep looking for COMMIT at /var/log/postgresql/postgres.log and I got 0 strings [01:38] ok, that's interesting === debonzi [~debonzi@200.158.100.251] has joined #launchpad [01:43] daf: should this page be killed?: http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/es [01:44] daf: I think we should remove it and serve from there only the .po/.mo files === SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad [01:45] daf: or serve the .po/.mo files as: http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/es/po and http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/es/mo [01:45] warty crashed [01:46] SteveA: wow, X crash? === SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad [02:00] daf: ? [02:04] SteveA: ? [02:05] I cannot run rosetta as checked in, as I get an error when going to the page http://localhost:8085/++skin++Debug/rosetta/projects/ubuntu [02:06] I cannot run rosetta as checked in, as I get an error when going to the page http://localhost:8085/++skin++Debug/rosetta/projects/ubuntu [02:06] SteveA: it works here, do you have latest database data? [02:06] # [02:06] # Module canonical.rosetta.browser, line 59, in products [02:06] person = RosettaPerson.selectBy(displayName='Dafydd Harries')[0] [02:06] # Module sqlobject.main, line 1194, in __getitem__ [02:06] return list(self.clone(start=start, end=start+1))[0] [02:06] perhaps I do not have the latest database data [02:07] make -C launchpad/database/schema launchpad_test [02:07] thanks [02:09] aaaaaaaaaaaaaaaaaaaaaaaaaaaaaargh! [02:09] daf: ? [02:10] when the database code is running inside Zope, % signs in queries make it crash and burn [02:10] when I use initZopeless, it works [02:10] did you read stu's email? [02:10] yes [02:10] I replied to it [02:11] http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/translate [02:11] RuntimeError: ('No information on plural forms for this language!', ) [02:12] SteveA: know bug [02:12] carlos: you shouldn't have made me the default, I speak Welsh :) [02:13] SteveA: to be able to enter there, edit the language list and remove welsh from the list of languages [02:13] from rosetta/prefs [02:13] daf: I thought that you added it because you speak welsh :-) [02:13] or append "?languages=" to the URL [02:13] I didn't add it! [02:13] http://localhost:8085/++skin++Debug/rosetta/prefs [02:13] * [02:13] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128) [02:13] I mean, that you added the Welsh's plural form expression :-P [02:14] SteveA: hmm, that's new [02:14] I've seen that before somewhere [02:14] SteveA: can you give me the last stack frame within the Rosetta code? [02:14] all I want to do is to write to the database so I can find out why it isn't committing [02:15] SteveA: but it works here [02:15] SteveA: wait, because perhaps it's my fault (I didn't got the updates outside launchpad), I'm testing it again now... [02:19] SteveA: same problem after getting latest code from all modules. But the prefs page does not have that error here... [02:19] that error == UnicodeDecodeError [02:20] carlos: can you give me the last stack frame within the Rosetta code? [02:21] daf: I don't have it, as I said, I don't get that error [02:21] same problem == database update error [02:21] what's the error you're getting? [02:22] I don't get a bt, the database is not updated, that's "all" [02:22] oh, that problem [02:24] daf: do you want something from me? [02:24] SteveA: yes [02:24] daf: If you are having troubles with '%''s in queries, are you logging the SQL received by PostgreSQL, and does this show the problem? [02:24] 13:14:38 SteveA: can you give me the last stack frame within the Rosetta code? [02:25] stub: not sure that it ever gets as far as Postgres [02:25] lunch time, see you later..... [02:25] daf: Does the process crash? [02:25] daf: I was confused by your request [02:25] stub: yes [02:25] I stack frame is not something I can give you [02:26] SteveA: from the backtrace, can you give the the last record which ocurrs within Rosetta code? [02:26] daf: You might be sneaking a Unicode string into Psycopg which will do that. If possible, you can try doing .encode('utf8') to see if it fixes the issue (then we have to plug the hole) [02:27] stub: hmm, that could be it [02:27] daf, it doesn't [02:27] stub: I'll give that a try [02:27] it is just on rendering a page template [02:27] SteveA: oh [02:27] SteveA: in that case, can you just paste me the traceback in Jabber? [02:34] * [02:34] RuntimeError: ('No information on plural forms for this language!', ) [02:34] I added a ?lanaguages=en [02:34] filled in the form [02:35] tried to submit it, and got that error [02:36] don't use that template [02:36] it doesn't write to the database [02:36] argh [02:37] tell me where to go so that I can use a page that writes to the database [02:37] stub: I don't think it's an encoding problem [02:38] daf: In theory, the only thing that could cause a crash is psycopg since everything else is written in Python. We need to track down the query being sent to psycopg.execute that causes the crash [02:39] stub: ok [02:39] (and the bound parameters if there are any) [02:39] stub: the error I'm getting, by the way, is "DatabaseException: unindexable object" [02:39] stub: sorry [02:39] daf: Oh... I thought you meant core dump crash :-) [02:39] stub: it doesn't crash in the segfault sense [02:40] daf: Probably right, and you need to do '%%foo%%' instead of '%foo%' [02:41] stub: it's more like "Opening %%d contact will open %%d new window as well." instead of "Opening %d contacts will open %d new windows as well." [02:41] stub: these are string comparisons, not LIKEs [02:42] stub: e.g. RosettaPOMessageID.selectBy(msgid=foo) [02:44] I must meet people for lunch. Back in a while. [02:45] Please let me know if there's a database problem to be tracked down, and if so, a page in rosetta I can use to try it out. [02:56] daf: Ok - I've got a test case that reproduces your bug [02:57] stub: oh, wow! [03:13] stub: yep, it definitely only happens under Zope [03:20] stub: .replace('%', '%%') removes the error, but the '%%' persists into the database query, which means the results are wrong [03:20] :-P [03:22] stub: sorry, are you meant to be off-duty? [03:32] daf: Yup, but I hang out here anyway. Go figure :-) [03:38] stub: ok, so long as you don't mind me bothering you :) [03:45] daf: Ok. It is either a psycopg bug or 'feature', being triggered by Zope3 [03:46] stub: what is this (mis)feature? [03:46] daf: I think I can fix Z3 upstream to work around the problem [03:46] huzzah! [03:47] daf: cursor.execute("insert into x values ('100%')", {}) [03:47] daf: psycopg then throws a wobbly [03:47] why so? [03:48] Because I suspect it just does 'parameter binding' by doing query % parameter_map (because PostgreSQL didn't used to support real bound parameters) [03:49] People generally won't notice, as they either use no bound variables (and no second argument to cursor.execute), or all bound variables so no stray %'s in the query. [03:49] but [03:50] if it does query % parameter_map [03:50] why are the %% persisting into the query sent to Postgres? [03:51] No idea :-) I might have found a different bug [03:52] No - it is the same bug [03:52] waah! [03:52] cursor.execute("insert into x values ('100%%')", {}) works, but sends a double %% to postgresql [03:53] well, even a workaround would be very helpful [03:56] if I have for lp.dbschema a class (ex: DistributionReleaseState) is it possible to get its state using the Item number? === lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad [03:56] s/for/from === ChanServ [ChanServ@services.] has joined #launchpad [04:20] daf: ping [04:23] SteveA: pong [04:28] SteveA: hmmm, seems like it works now. But I did not changed anything... [04:28] SteveA: the database is updated [04:28] http://localhost:8085/rosetta/prefs and http://localhost:8085/rosetta/projects/gnome/evolution/evolution-2.0/es/+edit [04:28] change the database [04:30] SteveA: the postgres log still does not shows any commit or rollback, but it shows a begin transaction and an end, I suppose it's the way it shows a commit.. [04:42] yes [04:46] so, is it working properly for you? [04:47] SteveA: did you want me for something? [04:47] SteveA: I'm thinking of having lunch [04:47] I wanted to ask you about * RuntimeError: ('No information on plural forms for this language!', ) [04:47] that's a bug [04:48] SteveA: hmm, I'm debugging now it, because after the submit, the database is updated but the webpage shows old data, if you reload it, it shows again valid data [04:48] SteveA: since I'm a bit stuck on this database stuff, I was thinking of working on that now [04:48] daf: have you had a meeting / taskboard thing for today? [04:48] SteveA: for "now" meaning "after lunch" [04:48] SteveA: no [04:49] SteveA: I have been rather lax in doing that [04:49] so, I think that the database is updated after the template fetchs the information from the objects (first the queries and then the submit but it should be, first the submit and then the queries...) [04:53] hm [04:53] that might well be happening [04:54] which template? [04:54] rosetta-preferences.pt [04:54] lots of tabs in that template ;-) [04:55] It's not mine :-) [04:56] ok, here's the problem [04:56] there are tal:define statements at the top [04:56] but the part that calls the "update stuff" is after those [04:56]
[04:56] that needs to be before [04:56] tal:define="languages view/languages; selectedLanguages view/selectedLanguages" > [04:57] so, do the tal:define on a div, or something like that [04:57] ok, thanks [04:57] and start it lower down [04:57] maybe even on the form tag [04:59] directly inside the form tag? [05:00] perfect, it works [05:00] thank you [05:01] the only remaining thing with that page is the selection of all prefered languages, limi's fix is not working [05:02] I mean, select them before submit the form [05:05] same template? [05:06] yes [05:06] what was limi's fix ? [05:07] I sent an email about it to launchpad [05:07]
tal:define="languages view/languages; selectedLanguages view/selectedLanguages" > [05:07] in theory with that form line should work [05:07] limi's fix is the onsubmit attribute [05:08] I changed the return false with retur true so it sends the submit [05:08] but I still get the list empty [05:08] ok [05:08] I just read the mail to the launchpad list [05:08] I think this is simple to fix [05:09] I know, but I have no idea about javascript and my html knowledge is basic [05:11] I will fix this now [05:12] ok, thank you [05:12] I have sent the merge request with my changes to that template [05:13] ok [05:14] onsubmit="javascript:selectAllWords();return true;" [05:14] try that please [05:15] adding that to the form tag [05:16] carlos: ping [05:16] SteveA: does not works [05:17] ok, I will investigate further [05:17] what exactly does it do for you? [05:17] ok [05:17] SteveA: It does the submit [05:17] does it select the selects? [05:17] but as I don't have any language selected [05:17] it removes all languages from the database for Daf [05:18] carlos: what's the status of the preferences page? [05:18] carlos: is it working? [05:18] daf: yes, it only has a problem with the html/javascript code [05:18] I'm just talking about the form, and the javascript [05:18] carlos: ok [05:18] carlos: how long do you think it will take to finish? [05:18] I can't see the prefs page [05:18] daf: it does not depends on me, SteveA is working on fixing it [05:18] because I get a unicode error [05:18] so, I cannot test this [05:19] hmm [05:19] let me regenerate my database and try it, perhaps I have something different... [05:20] I'll do that too [05:20] daf: the python code is all in place, it works if you manually select the list of languages from "My languages" before click over the save button [05:20] ok, works for me now [05:20] I updated, and regenerated my db [05:20] ok [05:23] ok, I'll see what's wrong with the javascript and fix it [05:27] I'd like us to try using Bugzilla as the focus of our task management [05:27] carlos: [05:27] SteveA: [05:27] how does that sound? [05:27] daf: that's perfect for me [05:28] ok [05:28] and, on the task board, we link to the bugs we're working on [05:29] ok [05:31] ok, I've updated for today [05:32] good === daf creates a named Bugzilla search called "Rosetta bugs" [05:33] hmm: bugs #1905-#1911 are all Rosetta's === carlos looks at bugzilla... [05:35] I think we should probably file things in Bugzilla at the drop of the hat [05:35] it's easy enough to close bogus bugs [05:35] but it's bad when we lost track of things that need doing [05:36] so, let's be bug-happy :) === daf -> lunch [05:51] carlos: I have a fix [05:51] SteveA: ok [05:55] I just sent it to pqm [05:55] try it out now though. [05:55] in canonical/lp/javascripts/launchpad.js [05:55] function selectAllWords() [05:55] { [05:55] var keyword = document.getElementsByTagName('select') [05:55] [05:55] for (var i=0; i < keyword.length; i++) [05:55] {if (keyword[i] .multiple) [05:55] { [05:55] for (var x=0; x < keyword[i] .options.length; x++) [05:55] { [05:55] keyword[i] .options[x] .selected = true [05:56] } [05:56] } [05:56] } [05:56] } [05:56] SteveA: with your previous fix? [05:57] onSubmit="javascript:selectAllWords();return true;" [05:57] tal:define="languages view/languages; selectedLanguages view/selectedLanguages" > [05:57] ok [05:57] that's the form tag from rosetta-preferences.pt [05:59] SteveA: ok, it works, but it also selects the "Available languages" list [06:00] is that a problem? [06:00] the code is supposed to select all multiple select boxes [06:01] If it's a problem, it's a UI one so we could ignore it now [06:01] ok, good [06:01] so, your code will work, and the page will work as intended [06:01] SteveA: thank you [06:01] is there a bugzilla bug on this? [06:01] SteveA: yes [06:02] great, then you'll be able to close it soon [06:02] SteveA: not yet, and I suppose it's not necessary it because it's fixed already, right? [06:02] SteveA: my yes is about " so, your code will work, and the page will work as intended" [06:03] ok, fine [06:03] this was a bug that involved more than one person, and some time and chatting [06:03] so, it would have been good to open a bug [06:03] when you're depending on someone else to fix code, always open a bug [06:04] ok === SteveA goes for a 10 minute break === lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad === daf <- lunch [06:22] daf: Did you get Mary's email? [06:24] spiv: yep [06:24] spiv: did you see any of that stuff about '%'s in queries? [06:24] spiv: (just sent a reply) [06:24] Ah, thanks. [06:24] Yeah, I did. [06:25] https://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=1909, by the way [06:25] Ah, great. [06:25] stub has a fix, but it's waiting on lifeless to merge it [06:40] daf: Could we add a metabug for Rosetta Alpha?, that way we could see easily the bugs that blocks the alpha to be released [06:52] daf: can you add a link to the "rosetta bugs" query to the taskboard page? [06:52] carlos: are you volunteering? :) [06:52] SteveA: sure [06:53] daf: yes [06:53] carlos: great, thanks! [06:56] https://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=1915 [06:57] please remember that any new bug should add the #1915 to its "blocks" fields [06:59] daf: I should leave now to study. Do you need anything from me now? [07:00] carlos: not right now [07:00] carlos: thanks [07:00] ok ,send me an email if you need anything I suppose I will read it from time to time until tonight [07:00] see you!! [07:00] good luck with your study === lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has left #launchpad []