[00:10:01] hello! it looks like the replag stats are constantly jumping between a few days and a few seconds. This can't be correct, then, right? https://tools.wmflabs.org/replag/ [00:13:04] err, I guess the full list of db servers is consistent. enwiki.labsdb is some 45 hours out of sync (!!!) [00:16:51] I will add, over the past few weeks or so, queries in general seems to be very, very slow. This isn't just for the `actor`/`comment` tables, but simple queries on `revision` or what have you [00:40:53] I see from -databases that there is maintenance going on. That explains it [01:11:11] switch to slave in Texas ;) [02:23:57] got it yet [02:24:03] thank you [02:25:19] andrewbogott: may I know some details about this issue? [02:27:24] doctaxon: Not right now. [03:03:17] James_F: down again? [03:03:53] doctaxon: Partially downn still. [20:26:55] bd808: hi - if I just issue `webservice start` will it use --backend=kubernetes and php7 [20:26:57] ? [20:29:36] hauskatze: today the default backend is still gridengine and the default type there is lighttpd+php [20:30:20] aha, so I'll use webservice start --backend=kubernetes php7.2 [20:31:33] hauskatze: *nod* that would give you the most up to date php environment [20:33:12] :) [20:33:45] I am using k8s backend with php5.6 actually. PHP 7 is not supported by some of our tools yet [20:33:54] hmm, two wikibugs [20:34:03] wikibugs: die [20:37:36] hauskatze: work on that php7 compat! I would like to kill off the php5.6 type in the next 3-6 months if we can [20:39:29] musikanim-al is kindly helping us - unfortunatelly I'd not know how to start :) [20:40:08] hauskatze: run it on php7, look for errors, fix, repeat :) [20:50:25] bd808: heh: https://gerrit.wikimedia.org/r/#/c/labs/tools/stewardbots/+/519087/ [20:52:27] looks like php7.3 is the issue: https://integration.wikimedia.org/ci/job/composer-package-php73-docker/5215/console [20:54:42] hauskatze: that failure is hilarious. Its PHP CodeSniffer complaining about a different version of PHP CodeSniffer :) [20:54:58] indeed [21:03:25] bd808: I though /vendor/ things were already excluded via .gitignore, but I'll try your suggestion :) [21:04:22] vendor gets created inside the CI process, so it's not checking the version from your computer, but the generated version from composer.lock [21:04:59] A possibly better fix would be to move the code into a src/ directory, but that might take more tweaking of your setup that you would like right now [21:05:13] *than you would like [21:06:42] I'll try your suggestion and see if CI passes [21:22:34] bd808: nope, it fails again, same issue [21:22:55] ignore -> exclude ? [21:24:28] https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders <-- says you're right [21:58:04] hi folks. i'm trying to query wikidata with a python script and it responds with a 403. does anyone know why? [22:01:31] which endpoint are you querying? [22:01:47] 'https://query.wikidata.org/bigdata/namespace/wdq/sparql' [22:12:57] mmecor: It might be related to the user agent. IIRC the default python requests user-agent header needs to be changed. [22:13:29] something like `urllib.request.Request(url,headers={'User-Agent': '')` [22:13:34] I'll see if I can find more info [22:16:15] data = requests.get(url, params={'query': query, 'format': 'json'}).json() [22:16:30] this is what i do [22:16:40] what should i put in the user-agent? [22:18:25] `requests.get(url,headers={'User-Agent': 'app name'}, params={'query': query, 'format': 'json'}).json()` [22:18:54] mmecor: putting the name of your tool or the url to an info page about it is usually good for a python script's user agent [22:19:29] * bd808 looks for the the helper library that does this [22:20:12] ok [22:20:15] now it doesn't show the 403 [22:20:21] but it doesn't work [22:20:24] https://wikitech.wikimedia.org/wiki/User:Legoktm/toolforge_library -- https://github.com/legoktm/toolforge/blob/master/toolforge/__init__.py#L96-L114 [22:20:34] raise JSONDecodeError("Expecting value", s, err.value) from None [22:20:34] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) [22:21:28] and the query is quite simple and works fine in query.wikidadta.org [22:21:29] https://query.wikidata.org/#%20%20%20%20SELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3Fisocode%20WHERE%20%7B%0A%20%20%20%20%20%20%20%20%20%20%3Fitem%20wdt%3AP297%20%3Fisocode%20.%0A%20%20%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%20%20%7D [22:22:41] Look at the request.status_code first [22:22:52] Dont assume its .json() [22:23:14] when I load https://query.wikidata.org/bigdata/namespace/wdq/sparql in my browser it seems to be returning RDF data [22:23:29] yes, right. i used the .json(), when i take it out i still see the 403. [22:24:47] ok. solved. [22:24:51] with the user-agent [22:25:10] i introduced a url from wikitech with my username and it worked [22:25:13] thank you :)