text
stringlengths
15
499
[20:18] <marc0s> http://dpaste.com/70576/
[20:21] <mars> marc0s, bind VirtualHost 443 to '*' instead of the local IP
[20:24] <marc0s> mars: now i get a warning about _default_ being overlapped by the one defined in local-launchpad
[20:24] <marc0s> and the behavior is the same ...
[20:25] <marc0s> oh wait
[20:26] <marc0s> i changed the two :443 vhost, not doing so in the bazaar one did the trick! :)
[20:27] <marc0s> thanks mars :)
=== Ursinha-lunch is now known as Ursinha
[21:13] <herb> barry: it's not looking good. I think I'm going to be tied up for the rest of the afternoon.
[21:13] <herb> barry: how pressing is this?
[21:13] <herb> barry: can we do it first thing tomorrow?
[21:16] <barry> herb: no worries. i'm still working on some local tests and a helper script, but i'm ocr today, so it's been slow going
[21:16] <barry> herb: let's do it tomorrow (and hopefully it will be a trivial thing ;)
[21:18] <herb> barry: sounds like a plan
[21:30] <mars> fun, I think I found a bug in pdb
[21:36] <mars> hmm, pdb doesn't like it when you mask its "args" command with the parameters "def foo(*args, **kwds)"
[21:41] <barry> herb: i have a script that will make this easy now in lp-dev-utils. we can do it tomorrow
[21:41] <herb> barry: excellent
[21:56] <Toba_> helllo oscon!
[21:56] <thumper> morning
[22:01] <Ursinha> morning thumper
[22:03] <mars> thumper, have a sec to help with a basic Python unicode question?
[22:04] <thumper> mars: sure
[22:04] <mars> thumper, looking at https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-1300E2074, the UnicodeDecodeError at the end
[22:04] <ubot3> https://devpad.canonical.com/~jamesh/oops.cgi/1300E2074
[22:04] <mars> ubot3, wrong URL?
[22:04] <ubot3> Factoid wrong url? not found
[22:04] <mars> :)
[22:05] <mars> thumper, I'm looking at the string substitution in login.py
[22:05] <mars> and I *think* that one of the strings going into that string substitution, or cgi.escape(), is unicode
[22:05] <thumper> mars: what line?
[22:06] <thumper> mars: that would explain the error :)
[22:06] <mars> thumper, line 381
[22:06] <thumper> which login.py?
[22:06] <mars> thumper, that would explain it, but I can't get the console to reproduce the error
[22:06] <mars> lib/canonical/launchpad/webapp/loging.py
[22:07] <thumper> looking
[22:07] <thumper> mars: I expect that cgi.escape is not expecting a unicode string
=== salgado is now known as salgado-afk
[22:08] <thumper> mars: what happens if we tell the form it is in UTF8 and encode the strings before cgi.escape?
[22:08] <mars> thumper, ok, trying to reproduce that in the console is a pain, thoughj
[22:08] <thumper> console?
[22:08] <thumper> which console?
[22:08] <mwhudson> i expect that cgi.FieldStorage shouldn't be returning a unicode string from items()
[22:08] <mars> Python console
[22:08] <mwhudson> the error will be from the '%s'%(u'\xe9',) part
[22:08] <mwhudson> er
[22:08] * mars tries that
[22:09] <mwhudson> or nog
[22:09] <mwhudson> not
[22:09] <mwhudson> no
[22:09] <mwhudson> '%s %s'%(u'x', '\xe9') will do it
[22:09] <mars> I tried that exact string in the Python interpreter, it didn't error out
[22:10] <thumper> mwhudson: why will the second do it?
[22:10] <mwhudson> yeah, i was wrong
[22:10] <mwhudson> thumper: because the presence of the unicode string upcasts the result to unicode
[22:10] <mwhudson> and then the non-ascii plain string can't be coerced into unicode
[22:10] <mars> it works because you are somehow mixing the string encodings with the intperpolator?
[22:11] <mars> ha
[22:11] <mars> and that works
[22:12] <mars> ah, now I remember the strange inverted logic for the UnicodeError messages - they are named the inverse of what you think they are doing :)
[22:12] <mwhudson> decode means moving towards unicode, yes :)
[22:12] <mars> yeah, that's the trick :)
[22:13] <mars> ok, so the problem is right there, in the line
[22:13] <mars> and the source of the evil string is field.title I think?
[22:13] <mars> https://lp-oops.canonical.com/oops.py/?oopsid=OOPS-1300E2074#requestvars
[22:13] <ubot3> https://devpad.canonical.com/~jamesh/oops.cgi/1300E2074
[22:13] <mwhudson> looks like it
[22:14] <mars> so the answer is to pre-decode everything
[22:14] <mwhudson> COME ON launchpad.dev, start up sometime soon
[22:14] <mwhudson> maybe
[22:14] <mars> actually
[22:14] <mars> you probably want to decode ASAP
[22:14] <mars> you know, at the edges
[22:15] <mars> so we would do so in iter_form_items(), because we can't do it in the Zope form object itself
[22:16] <mwhudson> however
[22:16] <mwhudson> i can't reproduce this
[22:17] <mwhudson> i.e. log out in launchpad.dev and go to https://bugs.launchpad.dev/bugs/+filebug/+login?field.title=%E0%AC%87
[22:17] <mars> hmm
[22:17] <mars> might be another field?
[22:17] <mars> the user name?
[22:17] <mwhudson> which is a character in some indian script and i get valid html back
[22:18] <mars> according to the request variables, there is only one field being submitted: field.title
[22:19] <mwhudson> yeah
[22:19] <mwhudson> ah
[22:19] <mars> or was that the list of variables coming into this page?
[22:19] <mwhudson> using _that_ field.title repros the bug
[22:19] <mars> ?
[22:19] <mwhudson> try it
[22:19] <mwhudson> https://bugs.launchpad.dev/bugs/+filebug/+login?field.title=package+uml-utilities+20070815-1.1ubuntu2+failed+to+install%2Fupgrade%3A+el+subproc%E9s+post-installation+script+retorn%E0+el+codi+d%27eixida+d%27error+1
[22:19] <mwhudson> (after logging out)
[22:20] <mwhudson> i don't know why my fancier example succeeded
[22:20] <mwhudson> (maybe because it has codepoints >= 128, but if that's really true we should take up crying as a hobby)
[22:22] * mwhudson cries
[22:22] <mars> :)
[22:23] <mars> mwhudson, I don't see the difference, perhaps it is the string structure? Mixing %27 with %E9?
[22:23] <mwhudson> https://bugs.launchpad.dev/bugs/+filebug/+login?field.title=%C4%80
[22:23] <mwhudson> succeeds
[22:24] <mars> mwhudson, https://bugs.launchpad.dev/bugs/+filebug/+login?field.title=aaa%C4bbb%80ccc
[22:24] <mwhudson> hmm, so does https://bugs.launchpad.dev/bugs/+filebug/+login?field.title=%C3%BF