=== ganesh is now known as gkadam [07:48] Hi! [07:48] I'm having troubles using launchpadlib [07:49] I don't have any token in ~/.launchpadlib/api.launchpad.net/cache/ [07:49] When I do this: [07:49] lp = Launchpad.login_with('my-script', 'production') [07:49] and then try to retrieve some data, I have the following crash [07:49] ePierre: launchpadlib hasn't stored tokens in ~/.launchpadlib for many years. Nowadays it'll use your desktop keyring (eg. gnome-keyring) if you're running from within a DE. [07:49] File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 125, in _bad_oauth_token [07:49] (content.startswith("Expired token") [07:50] wgrant, oh.... it's strange because everytime I launch my script, a file is generated in this directory [07:50] ePierre: It's a cache of resources from the API, not of credentials. [07:50] wgrant, and the script was working fine on my colleague's computer until he removed those files [07:51] wgrant, ok [07:51] wgrant, if I try to use lp = Launchpad.login_with('my-script'), it works, which means the staging version seems ok [07:51] but not the production... [07:52] ePierre: Are you using GNOME or a derivative? Which version of python3-launchpadlib is installed? [07:52] wgrant, Unity 7 (LTS 16.04) [07:52] wgrant, and I'm using 1.10.3-3 of python3-launchpadlib [07:52] ePierre: OK. Open up seahorse and find the api.launchpad.net entry under Passwords > Login. [07:52] Delete it and rerun your launchpadlib script, and it should prompt you to reauthorise your machine. [07:54] wgrant, yes, it works... but then it crashes once I authorize it: [07:55] File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 251, in from_string [07:55] key = params['oauth_token'] [07:55] KeyError: 'oauth_token' [07:56] ePierre: That looks like https://bugs.launchpad.net/launchpadlib/+bug/1471927. The Python 3 port of launchpadlib is quite immature. [07:56] Ubuntu bug 1471927 in launchpadlib "AccessToken.from_string() crashes on python3" [Undecided,Fix committed] [07:56] It's fixed in 16.10, *or* you can use Python 2 launchpadlib to acquire the token, and then the Python 3 one should be able to use it fine. [07:56] Or you can hack launchpadlib/credentials.py with the diff from https://code.launchpad.net/~xnox/launchpadlib/fix-1471927/+merge/264480 [07:57] wgrant, indeed it looks like this bug [07:59] wgrant, thanks for your help! I could generate the token with python2 [08:05] ePierre: Great. Let me know if you run into anything else. [08:08] wgrant, will do! Thanks :) [08:34] wgrant, just out of curiosty, the bug you pointed to will not be backported to 16.04? [14:15] as i wait for 'git push' to push like 50M of data... [14:15] is there a way to have launchpad "fork" a git repo for me ? [14:16] ie: [14:16] git clone git://git.launchpad.net/~usd-import-team/ubuntu/+source/isc-dhcp [14:16] git remote add smoser git+ssh://smoser@git.launchpad.net/~smoser/ubuntu/+source/isc-dhcp [14:16] git push smoser [14:16] that pushed 52M up that launchpad already had. [14:17] this was i think magically handled by bzr stacked branches or something in bzr [14:18] smoser: It works if the first repository is the default for its target, but you can't do that for package repositories yet [14:19] so not yet for package repositories, but it generally works automatically for project repos [14:19] we might add an explicit fork action at some point [14:19] ok thanks. [14:20] i probably would have been to lazy to go to a web page to push the fork button anyway [14:20] but ... if some automation did it for me i'd be happy [14:21] the current behaviour is as follows: if there's a default repository for the target, then we clone from that; if you're pushing a new named repository and you already have an owner-target default (e.g. ~smoser/ubuntu/+source/isc-dhcp as opposed to ~smoser/ubuntu/+source/isc-dhcp/+git/embargoed-security-stuff-that-must-not-leak) then we clone from that; otherwise we initialise a new repository === nacc_ is now known as nacc === Spads_ is now known as Spads === xnox_ is now known as xnox === om26er_ is now known as om26er === thomi_ is now known as thomi === iphutch_ is now known as iphutch === dobey_ is now known as dobey === aendrew_ is now known as aendrew === cjwatson_ is now known as cjwatson === verterok` is now known as verterok