/srv/irclogs.ubuntu.com/2015/11/17/#launchpad-dev.txt

=== satmandu_ is now known as satmandu
=== bpierre_ is now known as bpierre
=== mup_ is now known as mup
=== G_ is now known as G
sil2100Hello everyone!15:32
sil2100I seem to have a strange problem with launchpadlib15:33
sil2100Not sure what could be the reason...15:33
sil2100My script querries two archives constantly, one PPA and one ubuntu archive - everything looks fine up to a point where suddenly when doing getLatestSourcePublication() I get an error in /usr/lib/python3/dist-packages/launchpadlib/launchpad.py15:34
sil2100Sorry for the paste:15:34
sil2100File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 125, in _bad_oauth_token15:35
sil2100    (content.startswith("Expired token")15:35
sil2100TypeError: startswith first arg must be bytes or a tuple of bytes, not str15:35
sil2100I do a lot of getLatestSourcePublication(), getPublishedBinaries() and such15:35
cjwatsonCan you pastebin your entire script?  And are you running it interactively on your normal system, or is it running in cron on a server somewhere?15:35
cjwatsonOh, and also this is probably https://bugs.launchpad.net/bugs/147189415:36
mupBug #1471894: _bad_oauth_token crashes on python3 (str vs bytes) <launchpadlib :New> <https://launchpad.net/bugs/1471894>15:36
sil2100It's running on my machine, let me pastebinit15:36
sil2100Oh, looks promising15:36
cjwatsonEither drop back to Python 2 or apply the patch in the MP attached to that bug15:37
sil2100cjwatson: thanks!15:37
sil2100Let me try that15:37
sil2100cjwatson: could we get that SRUed to earlier releases?15:38
sil2100Or maybe it did, maybe it's just not in vivid15:38
cjwatsonIt hasn't been released upstream yet ...15:40
cjwatsonI can at least attempt to sort *that* bit out15:41
sil2100Anyway, thanks a lot, I didn't know if it was something broken on my script or elsewhere, as I never had this error before15:43
sil2100Even though I'm always using python315:43
sil2100cjwatson: ok, now I can see the real error... so when trying to do this:15:44
sil2100b = archive.getPublishedBinaries(binary_name='ca-certificates', version='20141019ubuntu0.15.04.1', exact_match=True)15:45
sil2100b[0].build.getLatestSourcePublication()15:45
sil2100I get a 401 - unauthorized15:45
sil2100I just want to get the source package of a published binary - how can I be unauthorized?15:45
cjwatsonsil2100: so, that's a bit awkward - the build was actually off in the security PPA, and you're unauthorized because you can't see the source package publishing history *there*15:49
cjwatsonsil2100: can you file a bug about this?  there are a couple of different plausible solutions and I want to consult with wgrant when he reappears15:50
sil2100cjwatson: sure, will do, in the meantime I'll probably just skip this package once that happens, not much I can do right now ;)15:51
cjwatsonYeah, I can't think of an easy satisfactory workaround there15:54
sil2100Anyway, thanks for clearing this up15:57
=== mbarnett` is now known as mbarnett

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