[00:00:49] @Basvb http://proxy.handle.net/10648/6b1454f4-1ad9-102f-a76c-003048944028 [00:01:28] this is an image whose corresponding 'zoek' url does not fetch a valid json. [00:01:41] http://www.gahetna.nl/beeldbank-api/zoek/6b1454f4-1ad9-102f-a76c-003048944028 [00:04:03] There could be several other exceptions. [00:04:30] In this case how do the user get the uuid for such an image? [00:04:44] @zhuyifei I tried the following 2 approaches to configure the pywikibot by setting the authenticate of config by the OAuth tokens. [00:04:51] Approach 1 : [00:05:31] as done in https://github.com/toollabs/video2commons/blob/master/video2commons/backend/worker.py#L129 [00:08:53] Here I populated the 'oauth' variable by creating a OAuth1 object from app.py like this. [00:09:03] auth = OAuth1(client_key=consumer_token.key, client_secret=consumer_token.secret, resource_owner_key=flask.session['access_token_key'], resource_owner_secret=flask.session['access_token_secret']) [00:09:27] This gives TypeError: 'OAuth1' object is not iterable [00:09:41] from pywikibot.config.authenticate['commons.wikimedia.org'] = (consumer_key, consumer_secret) + tuple(oauth) [00:12:28] Approach 2: I tried to set the authenticate like this. [00:14:03] pywikibot.config.authenticate['commons.wikimedia.org'] = (consumer_key, consumer_secret, flask.session['access_token_key'], flask.session['access_token_secret']) [00:14:20] This seemed to work fine. [00:14:30] But gives me [00:14:32] ERROR: User 'Infobliss' does not have upload rights on site commons:commons [00:15:14] probably from https://github.com/wikimedia/pywikibot-core/blob/1dc523994703cf34e0a4d6d2121f6a0863ff1487/pywikibot/specialbots.py#L457 [00:16:14] This is puzzling to me. [14:26:24] I will let you know when I see infobliss around here [14:26:24] @notify infobliss [14:26:36] You've already asked me to watch this user [14:26:36] @notify infobliss your second approach is okay. have you checked the oauth grants? [18:57:02] are you there zhuyifei? [18:59:35] You are right. I remember that I had requested for only the Basic rights while making the OAuth consumer application. [19:01:45] Now do I have to request for grants of uploading new files separately? [19:09:37] infobliss: yes [19:10:09] you might have to create a new consumer [19:11:14] ok [19:11:32] thanks for pointing out :) [19:11:46] np [19:12:26] so I will put the same application name and everything and they will provide new tokens. [19:12:36] is that correct? [19:12:44] yeah [19:12:55] but the version must change [19:14:07] i.e., Consumer version which is by default 1.0.? [19:14:15] yeah [19:14:43] Is 1.1 ok? [19:14:44] you can't have two consumers with same name and version [19:14:47] sure [19:14:56] alright. [19:17:36] ok see you in our weekly meeting tomorrow. [19:17:48] k [19:18:01] By that time I would have the new consumer. [19:18:31] you can test with an unapproved consumer [19:18:48] ok great. [19:19:03] (others can't when it's unapproved) [19:19:21] why is that so? [19:19:57] well, they are for the proposer to test with :P [19:21:21] I am not sure if I got you. [19:22:08] anybody who requests for consumer registration is a proposer right? [19:22:19] only the proposer of a consumer may use the consumer if it is unapproved [19:22:22] yeah [19:22:46] and that usage is for testing purposes [19:23:02] oh I see. [19:23:40] Oh it's already Sunday here :) [19:23:52] I am a night owl though :P [19:24:03] * zhuyifei1999_ too [19:24:07] 3am [19:24:36] haha good then. [19:24:57] time zone difference won't be a problem. [19:26:14] I am going to grab some snacks outside. [19:26:30] By this time at night I get hungry :P