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