/srv/irclogs.ubuntu.com/2004/09/17/#launchpad.txt

=== 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
carlosmorning12:48
carlosdaf: We should solve the case when a language does not have a default plural form12:48
dafcarlos: yes12:49
carlosdaf: any idea of the procedure to do it?, do we have it defined?12:53
dafwhat do you mean "solve"?12:54
carlosdaf: http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/translate12:54
carlosfails12:54
carlosbecause welsh does not have plural forms12:55
dafright12:55
dafI have an idea for it12:55
carlosphone 12:56
limicarlos: I have a solutions for the language selection widget12:56
carloslimi: good!!01:05
carlosdaf: Could you share it? :-)01:05
carloslimi: Do I need to change my code?01:05
limialready checked in, and sending mail to the list now01:05
limino01:05
carlosok01:06
limimail sent01:06
limiplease test the code01:06
=== limi is in a hurry
dafcarlos: well, error reporting in the translation template needs to be better in general01:07
limiI shouldn't really be here ;)01:07
limiplane leaves in 3 hours01:07
carloslimi: downloading01:08
carlosdaf: I know :-)01:08
daffor now, the view class should set a flag for this error, and the template should check for it01:08
dafand it should work similarly for other errors01:09
carloslimi: not yet at rocketfuel...01:09
carlosdaf: make sense01:10
carlosSteveA, spiv: The database updated is not working, with the SteveA's patch seems to work better but the commit is never done01:17
=== limi [~limi@159.80-202-72.nextgentel.com] has left #launchpad []
SteveAis the commit never done for any query?01:30
carlosSteveA: the log does not have any COMMIT01:32
SteveAis this try for all queries, or just some?01:33
carlosSteveA: I did a grep looking for COMMIT at /var/log/postgresql/postgres.log and I got 0 strings01:34
SteveAok, that's interesting01:38
=== debonzi [~debonzi@200.158.100.251] has joined #launchpad
carlosdaf: should this page be killed?:  http://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/es01:43
carlosdaf: I think we should remove it and serve from there only the .po/.mo files01:44
=== SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad
carlosdaf: 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/mo01:45
SteveAwarty crashed01:45
carlosSteveA: wow, X crash?01:46
=== SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad
SteveAdaf: ?02:00
dafSteveA: ?02:04
SteveAI cannot run rosetta as checked in, as I get an error when going to the page http://localhost:8085/++skin++Debug/rosetta/projects/ubuntu02:05
SteveAI cannot run rosetta as checked in, as I get an error when going to the page http://localhost:8085/++skin++Debug/rosetta/projects/ubuntu02:06
carlosSteveA: it works here, do you have latest database data?02:06
SteveA#02:06
SteveA# Module canonical.rosetta.browser, line 59, in products02:06
SteveAperson = RosettaPerson.selectBy(displayName='Dafydd Harries')[0] 02:06
SteveA# Module sqlobject.main, line 1194, in __getitem__02:06
SteveAreturn list(self.clone(start=start, end=start+1))[0] 02:06
SteveAperhaps I do not have the latest database data02:06
dafmake -C launchpad/database/schema launchpad_test02:07
SteveAthanks02:07
dafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargh!02:09
carlosdaf: ?02:09
dafwhen the database code is running inside Zope, % signs in queries make it crash and burn02:10
dafwhen I use initZopeless, it works02:10
SteveAdid you read stu's email?02:10
dafyes02:10
dafI replied to it02:10
SteveAhttp://localhost:8085/++skin++Debug/rosetta/projects/gnome/evolution/evolution-2.0/translate02:11
SteveARuntimeError: ('No information on plural forms for this language!', <RosettaLanguage at 0x409ebcec>)02:11
carlosSteveA: know bug02:12
dafcarlos: you shouldn't have made me the default, I speak Welsh :)02:12
carlosSteveA: to be able to enter there, edit the language list and remove welsh from the list of languages02:13
carlosfrom rosetta/prefs02:13
carlosdaf: I thought that you added it because you speak welsh :-)02:13
dafor append "?languages=" to the URL02:13
dafI didn't add it!02:13
SteveAhttp://localhost:8085/++skin++Debug/rosetta/prefs02:13
SteveA    *02:13
SteveAUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)02:13
carlosI mean, that you added the Welsh's plural form expression :-P02:13
carlosSteveA: hmm, that's new02:14
dafI've seen that before somewhere02:14
dafSteveA: can you give me the last stack frame within the Rosetta code?02:14
SteveAall I want to do is to write to the database so I can find out why it isn't committing02:14
carlosSteveA: but it works here02:15
carlosSteveA: wait, because perhaps it's my fault (I didn't got the updates outside launchpad), I'm testing it again now...02:15
carlosSteveA: same problem after getting latest code from all modules. But the prefs page does not have that error here...02:19
carlosthat error == UnicodeDecodeError02:19
dafcarlos: can you give me the last stack frame within the Rosetta code?02:20
carlosdaf: I don't have it, as I said, I don't get that error02:21
carlossame problem == database update error02:21
dafwhat's the error you're getting?02:21
carlosI don't get a bt, the database is not updated, that's "all"02:22
dafoh, that problem02:22
SteveAdaf: do you want something from me?02:24
dafSteveA: yes02:24
stubdaf: 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
daf13:14:38 <daf> SteveA: can you give me the last stack frame within the Rosetta code?02:24
dafstub: not sure that it ever gets as far as Postgres02:25
carloslunch time, see you later.....02:25
stubdaf: Does the process crash?02:25
SteveAdaf: I was confused by your request02:25
dafstub: yes02:25
SteveAI stack frame is not something I can give you02:25
dafSteveA: from the backtrace, can you give the the last record which ocurrs within Rosetta code?02:26
stubdaf: 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:26
dafstub: hmm, that could be it02:27
SteveAdaf, it doesn't02:27
dafstub: I'll give that a try02:27
SteveAit is just on rendering a page template02:27
dafSteveA: oh02:27
dafSteveA: in that case, can you just paste me the traceback in Jabber?02:27
SteveA    *02:34
SteveARuntimeError: ('No information on plural forms for this language!', <RosettaLanguage at 0x406b29ec>)02:34
SteveAI added a ?lanaguages=en02:34
SteveAfilled in the form02:34
SteveAtried to submit it, and got that error02:35
dafdon't use that template02:36
dafit doesn't write to the database02:36
SteveAargh02:36
SteveAtell me where to go so that I can use a page that writes to the database02:37
dafstub: I don't think it's an encoding problem02:37
stubdaf: 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 crash02:38
dafstub: ok02:39
stub(and the bound parameters if there are any)02:39
dafstub: the error I'm getting, by the way, is "DatabaseException: unindexable object"02:39
dafstub: sorry02:39
stubdaf: Oh... I thought you meant core dump crash :-)02:39
dafstub: it doesn't crash in the segfault sense02:39
stubdaf: Probably right, and you need to do '%%foo%%' instead of '%foo%'02:40
dafstub: 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
dafstub: these are string comparisons, not LIKEs02:41
dafstub: e.g. RosettaPOMessageID.selectBy(msgid=foo)02:42
SteveAI must meet people for lunch.  Back in a while.02:44
SteveAPlease 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:45
stubdaf: Ok - I've got a test case that reproduces your bug02:56
dafstub: oh, wow!02:57
dafstub: yep, it definitely only happens under Zope03:13
dafstub: .replace('%', '%%') removes the error, but the '%%' persists into the database query, which means the results are wrong03:20
stub:-P03:20
dafstub: sorry, are you meant to be off-duty?03:22
stubdaf: Yup, but I hang out here anyway. Go figure :-)03:32
dafstub: ok, so long as you don't mind me bothering you :)03:38
stubdaf: Ok. It is either a psycopg bug or 'feature', being triggered by Zope303:45
dafstub: what is this (mis)feature?03:46
stubdaf: I think I can fix Z3 upstream to work around the problem03:46
dafhuzzah!03:46
stubdaf: cursor.execute("insert into x values ('100%')", {})03:47
stubdaf: psycopg then throws a wobbly03:47
dafwhy so?03:47
stubBecause I suspect it just does 'parameter binding' by doing query % parameter_map (because PostgreSQL didn't used to support real bound parameters)03:48
stubPeople 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
dafbut03:49
dafif it does query % parameter_map03:50
dafwhy are the %% persisting into the query sent to Postgres?03:50
stubNo idea :-) I might have found a different bug03:51
stubNo - it is the same bug03:52
dafwaah!03:52
stubcursor.execute("insert into x values ('100%%')", {}) works, but sends a double %% to postgresql03:52
dafwell, even a workaround would be very helpful03:53
debonziif I have for lp.dbschema a class (ex: DistributionReleaseState) is it possible to get its state using the Item number?03:56
=== lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
debonzis/for/from03:56
=== ChanServ [ChanServ@services.] has joined #launchpad
SteveAdaf: ping04:20
dafSteveA: pong04:23
carlosSteveA: hmmm, seems like it works now. But I did not changed anything...04:28
carlosSteveA: the database is updated04:28
carloshttp://localhost:8085/rosetta/prefs and http://localhost:8085/rosetta/projects/gnome/evolution/evolution-2.0/es/+edit04:28
carloschange the database04:28
carlosSteveA: 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:30
SteveAyes04:42
SteveAso, is it working properly for you?04:46
dafSteveA: did you want me for something?04:47
dafSteveA: I'm thinking of having lunch04:47
SteveAI wanted to ask you about     * RuntimeError: ('No information on plural forms for this language!', <RosettaLanguage at 0x406b29ec>)04:47
dafthat's a bug04:47
carlosSteveA: 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 data04:48
dafSteveA: since I'm a bit stuck on this database stuff, I was thinking of working on that now04:48
SteveAdaf: have you had a meeting / taskboard thing for today?04:48
dafSteveA: for "now" meaning "after lunch"04:48
dafSteveA: no04:48
dafSteveA: I have been rather lax in doing that04:49
carlosso, 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:49
SteveAhm04:53
SteveAthat might well be happening04:53
SteveAwhich template?04:54
carlosrosetta-preferences.pt04:54
SteveAlots of tabs in that template ;-)04:54
carlosIt's not mine :-)04:55
SteveAok, here's the problem04:56
SteveAthere are tal:define statements at the top04:56
SteveAbut the part that calls the "update stuff" is after those04:56
SteveA    <div tal:content="view/submit" />04:56
SteveAthat needs to be before 04:56
SteveA     tal:define="languages view/languages; selectedLanguages view/selectedLanguages" >04:56
SteveAso, do the tal:define on a div, or something like that04:57
carlosok, thanks04:57
SteveAand start it lower down04:57
SteveAmaybe even on the form tag04:57
carlosdirectly inside the form tag?04:59
carlosperfect, it works05:00
carlosthank you05:00
carlosthe only remaining thing with that page is the selection of all prefered languages, limi's fix is not working05:01
carlosI mean, select them before submit the form05:02
SteveAsame template?05:05
carlosyes05:06
SteveAwhat was limi's fix ?05:06
carlosI sent an email about it to launchpad05:07
carlos<form action="prefs" method="post" onsubmit="selectAllWords();return true;"05:07
carlos          tal:define="languages view/languages; selectedLanguages view/selectedLanguages" >05:07
carlosin theory with that form line should work05:07
carloslimi's fix is the onsubmit attribute05:07
carlosI changed the return false with retur true so it sends the submit05:08
carlosbut I still get the list empty05:08
SteveAok05:08
SteveAI just read the mail to the launchpad list05:08
SteveAI think this is simple to fix05:08
carlosI know, but I have no idea about javascript and my html knowledge is basic05:09
SteveAI will fix this now05:11
carlosok, thank you05:12
carlosI have sent the merge request with my changes to that template05:12
SteveAok05:13
SteveA    onsubmit="javascript:selectAllWords();return true;"05:14
SteveAtry that please05:14
SteveAadding that to the form tag05:15
SteveAcarlos: ping05:16
carlosSteveA: does not works05:16
SteveAok, I will investigate further05:17
SteveAwhat exactly does it do for you?05:17
carlosok05:17
carlosSteveA: It does the submit 05:17
SteveAdoes it select the selects?05:17
carlosbut as I don't have any language selected05:17
carlosit removes all languages from the database for Daf05:17
dafcarlos: what's the status of the preferences page?05:18
dafcarlos: is it working?05:18
carlosdaf: yes, it only has a problem with the html/javascript code05:18
SteveAI'm just talking about the form, and the javascript05:18
dafcarlos: ok05:18
dafcarlos: how long do you think it will take to finish?05:18
SteveAI can't see the prefs page05:18
carlosdaf: it does not depends on me, SteveA is working on fixing it05:18
SteveAbecause I get a unicode error05:18
SteveAso, I cannot test this05:18
carloshmm05:19
carloslet me regenerate my database and try it, perhaps I have something different...05:19
SteveAI'll do that too05:20
carlosdaf: 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 button05:20
SteveAok, works for me now05:20
SteveAI updated, and regenerated my db05:20
carlosok05:20
SteveAok, I'll see what's wrong with the javascript and fix it05:23
dafI'd like us to try using Bugzilla as the focus of our task management05:27
dafcarlos: 05:27
dafSteveA: 05:27
dafhow does that sound?05:27
carlosdaf: that's perfect for me05:27
dafok05:28
dafand, on the task board, we link to the bugs we're working on05:28
carlosok05:29
dafok, I've updated for today05:31
SteveAgood05:32
=== daf creates a named Bugzilla search called "Rosetta bugs"
dafhmm: bugs #1905-#1911 are all Rosetta's05:33
=== carlos looks at bugzilla...
dafI think we should probably file things in Bugzilla at the drop of the hat05:35
dafit's easy enough to close bogus bugs05:35
dafbut it's bad when we lost track of things that need doing05:35
dafso, let's be bug-happy :)05:36
=== daf -> lunch
SteveAcarlos: I have a fix05:51
carlosSteveA: ok05:51
SteveAI just sent it to pqm05:55
SteveAtry it out now though.05:55
SteveAin canonical/lp/javascripts/launchpad.js05:55
SteveAfunction selectAllWords()05:55
SteveA    {05:55
SteveA    var keyword = document.getElementsByTagName('select')05:55
SteveA05: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 = true05:55
SteveA            }05:56
SteveA            }05:56
SteveA         }05:56
SteveA    }05:56
carlosSteveA: with your previous fix?05:56
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
carlosok05:57
SteveAthat's the form tag from rosetta-preferences.pt05:57
carlosSteveA: ok, it works, but it also selects the "Available languages" list05:59
SteveAis that a problem?06:00
SteveAthe code is supposed to select all multiple select boxes06:00
carlosIf it's a problem, it's a UI one so we could ignore it now06:01
SteveAok, good06:01
SteveAso, your code will work, and the page will work as intended06:01
carlosSteveA: thank you06:01
SteveAis there a bugzilla bug on this?06:01
carlosSteveA: yes06:01
SteveAgreat, then you'll be able to close it soon06:02
carlosSteveA: not yet, and I suppose it's not necessary it because it's fixed already, right?06:02
carlosSteveA: my yes is about "<SteveA> so, your code will work, and the page will work as intended"06:02
SteveAok, fine06:03
SteveAthis was a bug that involved more than one person, and some time and chatting06:03
SteveAso, it would have been good to open a bug06:03
SteveAwhen you're depending on someone else to fix code, always open a bug06:03
carlosok06:04
=== SteveA goes for a 10 minute break
=== lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
=== daf <- lunch
spivdaf: Did you get Mary's email?06:22
dafspiv: yep06:24
dafspiv: did you see any of that stuff about '%'s in queries?06:24
dafspiv: (just sent a reply)06:24
spivAh, thanks.06:24
spivYeah, I did.06:24
dafhttps://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=1909, by the way06:25
spivAh, great.06:25
dafstub has a fix, but it's waiting on lifeless to merge it06:25
carlosdaf: Could we add a metabug for Rosetta Alpha?, that way we could see easily the bugs that blocks the alpha to be released06:40
SteveAdaf: can you add a link to the "rosetta bugs" query to the taskboard page?06:52
dafcarlos: are you volunteering? :)06:52
dafSteveA: sure06:52
carlosdaf: yes06:53
dafcarlos: great, thanks!06:53
carloshttps://bugzilla.warthogs.hbd.com/bugzilla/show_bug.cgi?id=191506:56
carlosplease remember that any new bug should add the #1915 to its "blocks" fields06:57
carlosdaf: I should leave now to study. Do you need anything from me now?06:59
dafcarlos: not right now07:00
dafcarlos: thanks07:00
carlosok ,send me an email if you need anything I suppose I will read it from time to time until tonight07:00
carlossee you!!07:00
dafgood luck with your study07:00
=== lulu [~lu@host217-37-231-28.in-addr.btopenworld.com] has left #launchpad []

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!