[11:58:27] tying again – anyone that can help me with python & mwoauth? [12:18:35] Nudin: there are a few people here or on #pywikibot who know a bit about it, yes [12:24:12] I got stuck with how to use the oauth-token. I tries following the examples on wikitech but I get an error when calling the api and don't know further [12:24:45] [2019-01-18 00:10:46,576] ERROR in app: Exception on /sendquery [POST] [12:24:47] Traceback (most recent call last): [12:24:49] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/app.py", line 2292, in wsgi_app [12:24:51] response = self.full_dispatch_request() [12:24:53] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/app.py", line 1815, in full_dispatch_request [12:24:55] rv = self.handle_user_exception(e) [12:24:57] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/app.py", line 1718, in handle_user_exception [12:24:59] reraise(exc_type, exc_value, tb) [12:25:01] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/_compat.py", line 35, in reraise [12:25:03] raise value [12:25:05] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/app.py", line 1813, in full_dispatch_request [12:25:07] rv = self.dispatch_request() [12:25:09] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/flask/app.py", line 1799, in dispatch_request [12:25:11] return self.view_functions[rule.endpoint](**req.view_args) [12:25:13] File "/data/project/wdbeoupdate/www/python/src/app.py", line 87, in sendquery [12:25:15] status, text = watch_pages(pages, flask.session["access_token"]) [12:25:17] File "/data/project/wdbeoupdate/www/python/src/app.py", line 65, in watch_pages [12:25:19] watch_pages(pages[50:], auth) [12:25:21] File "/data/project/wdbeoupdate/www/python/src/app.py", line 65, in watch_pages [12:25:23] watch_pages(pages[50:], auth) [12:25:25] File "/data/project/wdbeoupdate/www/python/src/app.py", line 69, in watch_pages [12:25:27] req = requests.post(wdapiurl, data=params, auth=auth) [12:25:29] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/api.py", line 116, in post [12:25:31] return request('post', url, data=data, json=json, **kwargs) [12:25:33] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/api.py", line 60, in request [12:25:35] return session.request(method=method, url=url, **kwargs) [12:25:37] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/sessions.py", line 519, in request [12:25:39] prep = self.prepare_request(req) [12:25:41] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/sessions.py", line 462, in prepare_request [12:25:43] hooks=merge_hooks(request.hooks, self.hooks), [12:25:45] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/models.py", line 317, in prepare [12:25:47] self.prepare_auth(auth, url) [12:25:49] File "/data/project/wdbeoupdate/www/python/venv/lib/python3.4/site-packages/requests/models.py", line 548, in prepare_auth [12:25:51] r = auth(self) [12:25:53] https://gist.github.com/Nudin/84fcc915229551e76516c13ca4491753 [12:25:57] ^sorry, that was unintended [12:26:03] The relevant lines in the gist als 69 and 139-146 [21:30:55] Nudin: I suppose putting the Oauth1 object in the session does something bad to it [21:31:27] you get back a serialized representation instead of the actual object, or something like that [21:31:52] did you debug the value of the auth parameter that's passed to the watch method? [23:15:59] WDQS is giving me timeouts. I'm not running complex queries. [23:17:10] Ignore me, seems a bit happier now.