=== satmandu_ is now known as satmandu | ||
=== bpierre_ is now known as bpierre | ||
=== mup_ is now known as mup | ||
=== G_ is now known as G | ||
sil2100 | Hello everyone! | 15:32 |
---|---|---|
sil2100 | I seem to have a strange problem with launchpadlib | 15:33 |
sil2100 | Not sure what could be the reason... | 15:33 |
sil2100 | My 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.py | 15:34 |
sil2100 | Sorry for the paste: | 15:34 |
sil2100 | File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 125, in _bad_oauth_token | 15:35 |
sil2100 | (content.startswith("Expired token") | 15:35 |
sil2100 | TypeError: startswith first arg must be bytes or a tuple of bytes, not str | 15:35 |
sil2100 | I do a lot of getLatestSourcePublication(), getPublishedBinaries() and such | 15:35 |
cjwatson | Can 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 |
cjwatson | Oh, and also this is probably https://bugs.launchpad.net/bugs/1471894 | 15:36 |
mup | Bug #1471894: _bad_oauth_token crashes on python3 (str vs bytes) <launchpadlib :New> <https://launchpad.net/bugs/1471894> | 15:36 |
sil2100 | It's running on my machine, let me pastebinit | 15:36 |
sil2100 | Oh, looks promising | 15:36 |
cjwatson | Either drop back to Python 2 or apply the patch in the MP attached to that bug | 15:37 |
sil2100 | cjwatson: thanks! | 15:37 |
sil2100 | Let me try that | 15:37 |
sil2100 | cjwatson: could we get that SRUed to earlier releases? | 15:38 |
sil2100 | Or maybe it did, maybe it's just not in vivid | 15:38 |
cjwatson | It hasn't been released upstream yet ... | 15:40 |
cjwatson | I can at least attempt to sort *that* bit out | 15:41 |
sil2100 | Anyway, thanks a lot, I didn't know if it was something broken on my script or elsewhere, as I never had this error before | 15:43 |
sil2100 | Even though I'm always using python3 | 15:43 |
sil2100 | cjwatson: ok, now I can see the real error... so when trying to do this: | 15:44 |
sil2100 | b = archive.getPublishedBinaries(binary_name='ca-certificates', version='20141019ubuntu0.15.04.1', exact_match=True) | 15:45 |
sil2100 | b[0].build.getLatestSourcePublication() | 15:45 |
sil2100 | I get a 401 - unauthorized | 15:45 |
sil2100 | I just want to get the source package of a published binary - how can I be unauthorized? | 15:45 |
cjwatson | sil2100: 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 |
cjwatson | sil2100: can you file a bug about this? there are a couple of different plausible solutions and I want to consult with wgrant when he reappears | 15:50 |
sil2100 | cjwatson: 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 |
cjwatson | Yeah, I can't think of an easy satisfactory workaround there | 15:54 |
sil2100 | Anyway, thanks for clearing this up | 15:57 |
=== mbarnett` is now known as mbarnett |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!