[03:24:57] (03CR) 10DannyS712: "Recheck" [extensions/MassMessage] - 10https://gerrit.wikimedia.org/r/519799 (https://phabricator.wikimedia.org/T226929) (owner: 10DannyS712) [03:26:18] (03CR) 10DannyS712: "@Legoktm you're listed as the maintainer of the extension - can you take a look?" [extensions/MassMessage] - 10https://gerrit.wikimedia.org/r/519799 (https://phabricator.wikimedia.org/T226929) (owner: 10DannyS712) [04:53:06] (03PS1) 10Samwilson: Allow CargoUtils::makeLink() to produce red-links [extensions/Cargo] - 10https://gerrit.wikimedia.org/r/541410 [04:53:55] (03CR) 10Samwilson: "I'll make a patch to explain what I think is the error." (031 comment) [extensions/Cargo] - 10https://gerrit.wikimedia.org/r/529093 (owner: 10Yaron Koren) [09:55:18] hello tybanash [10:24:12] 10Africa-Wikimedia-Developers, 10ISA: Fix Typo for function combine_campign_content - https://phabricator.wikimedia.org/T234899 (10Eugene233) [13:23:52] hello @r054l13 [13:26:54] tybanash: This apear in your code twice `const fetch = require('node-fetch')` [13:27:08] delete line 10 [13:27:31] no line 23 [13:29:08] the error says you have defined fetch more than once. which make sense because you did it twice line 10 and 23. and fetch is a constant not a variable. you can't define it twice [13:31:30] tybanash: please let me know if that solves your problem. [13:33:14] ok thank you [13:53:40] i still have an error https://www.irccloud.com/pastebin/OB84o79O/ [13:54:15] @r054l13 [13:54:29] am there [13:56:11] use this to install it https://www.npmjs.com/package/node-fetch#installation [13:56:46] install node-fetch. see the link ^ [13:58:58] okay [14:06:33] please where am i to install it? is it underin the directory of the file where my code is [14:07:00] I have node installed but its in a different folder, different from the folder where my code is [14:08:00] `npm install node-fetch --save` this should install it globaly [14:08:05] but let me just check [14:10:10] Not it doesn't . you need to add the `-g` option for it to be installed globally [14:10:38] run it in your project directory [14:12:32] npm install node-fetch -g--save ? [14:12:48] So, `npm install -g node-fetch` should have it work irrespective of your currect working directory [14:13:01] ok [14:13:18] otherwise, enter you project dir and do `npm install node-fetch --save` [14:16:09] i used the global method https://www.irccloud.com/pastebin/UaGHOyVQ/ [14:16:53] Please check that out. Am i good to go? I had no error message while running the code. [14:21:25] I have no idea what you are trying to do. I just helped debug from the error messages. [14:21:38] what are you trying to achieve? [14:21:50] but if you have no error it is a good sign :) [14:23:56] i wrote a sample code for an API page called contributors. So i wrote a sample code for it and i was trying to run the code before i got those errors [14:24:20] tybanash: what output do you expect? [14:24:40] a list of contributors or something else or no output [14:26:03] From the code, I think you intend to have some logged output, like names of contributors (not sure). If that is the case then you ave no error but still have bugs. it is not working :( [14:28:15] okay [14:29:52] check your code and the documentation you are following. there should be something wrong or missen [14:33:52] i am supposed to get the list of contributors and the count of anonymous contributors [14:37:51] ok. you are not getting anything so there are some hidden mistakes probably. [14:39:31] i had no list of contributors when i ran the code [14:47:04] ok replace this `url = url + "?origin=*"; [14:47:04] Object.keys(params).forEach(function(key){url += "&" + key + "=" + params[key];});` [14:47:37] with this: `url = 'https://en.wikipedia.org/w/api.php?action=query&titles=MediaWiki&prop=contributors';` [14:47:47] and run it again [14:47:54] let me know if it works [14:49:25] tybanash: ^ [15:01:33] { FetchError: invalid json response body at https://en.wikipedia.org/w/api.php?action=query&titles=MediaWiki&prop=contributors reason: Unexpected token < in JSON at position 0 [15:01:33] at C:\Users\USER\mediawiki-api-demos\javascript\node_modules\node-fetch\lib\index.js:272:32 [15:01:33] at process._tickCallback (internal/process/next_tick.js:68:7) [15:01:33] message: [15:01:33] 'invalid json response body at https://en.wikipedia.org/w/api.php?action=query&titles=MediaWiki&prop=contributors reason: Unexpected token < in JSON at position 0', [15:01:33] type: 'invalid-json' } [15:01:34] [Finished in 2.3s] [15:02:11] it didnt work @r054l13 [15:03:35] add `&format=json` [15:03:42] at the end of the url [15:04:45] so this is what you should use `url = 'https://en.wikipedia.org/w/api.php?action=query&titles=MediaWiki&prop=contributors&format=json';` [15:05:44] **fingers crossed [15:11:03] theres no errror but there is still a bug because i have no output [15:11:11] maybe my code is wrong [15:14:43] well if it is not working then there is something wrong and that is what we trying to fix right? [15:14:47] 10Africa-Wikimedia-Developers, 10ISA: Fix Typo for function combine_campign_content - https://phabricator.wikimedia.org/T234899 (10AwahNadege) Interested in fixing this. Please where can i find the file folder where this function is located @Eugene233 [15:16:03] Yes. Have read the documentation and made some changes but still the same [15:41:59] (03CR) 10Yaron Koren: [C: 03+2] Allow CargoUtils::makeLink() to produce red-links [extensions/Cargo] - 10https://gerrit.wikimedia.org/r/541410 (owner: 10Samwilson) [15:44:28] (03Merged) 10jenkins-bot: Allow CargoUtils::makeLink() to produce red-links [extensions/Cargo] - 10https://gerrit.wikimedia.org/r/541410 (owner: 10Samwilson) [17:13:50] 10Africa-Wikimedia-Developers, 10ISA: Fix Typo for function combine_campign_content - https://phabricator.wikimedia.org/T234899 (10Eugene233) Have you cloned the tool from gerrit already @AwahNadege? [20:44:03] (03PS1) 10Jon Harald Søby: Add Hindi to Wikisource family file [pywikibot/core] - 10https://gerrit.wikimedia.org/r/541626 [20:46:45] (03CR) 10jerkins-bot: [V: 04-1] Add Hindi to Wikisource family file [pywikibot/core] - 10https://gerrit.wikimedia.org/r/541626 (owner: 10Jon Harald Søby) [20:54:12] (03CR) 10Jon Harald Søby: "recheck" [pywikibot/core] - 10https://gerrit.wikimedia.org/r/541626 (owner: 10Jon Harald Søby) [20:58:25] (03CR) 10jerkins-bot: [V: 04-1] Add Hindi to Wikisource family file [pywikibot/core] - 10https://gerrit.wikimedia.org/r/541626 (owner: 10Jon Harald Søby) [21:01:43] 10Pywikibot, 10Pywikibot-login.py, 10Patch-For-Review, 10User-revi: cannot use delete.py despite being admin on a wiki - https://phabricator.wikimedia.org/T233608 (10Dvorapa) >>! In T233608#5518942, @Xqt wrote: > Very strange: You are logged in successfully but you aren't obviously during running the scrip... [21:04:03] 10Pywikibot, 10Pywikibot-login.py, 10Patch-For-Review, 10User-revi: cannot use delete.py despite being admin on a wiki - https://phabricator.wikimedia.org/T233608 (10jhsoby) I'm having a similar issue with movepages.py. Each time I run the command, the bot will move one page and then say it isn't authorize... [21:24:01] (03Abandoned) 10Jon Harald Søby: Add Hindi to Wikisource family file [pywikibot/core] - 10https://gerrit.wikimedia.org/r/541626 (owner: 10Jon Harald Søby) [21:33:44] 10Pywikibot, 10Pywikibot-login.py, 10Patch-For-Review, 10User-revi: cannot use delete.py despite being admin on a wiki - https://phabricator.wikimedia.org/T233608 (10Dvorapa) @jhsoby from IRC: it works almost exactly 25 % of the time: https://hi.wikisource.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A... [21:40:39] 10Pywikibot, 10Pywikibot-login.py, 10Patch-For-Review, 10User-revi: cannot use delete.py despite being admin on a wiki - https://phabricator.wikimedia.org/T233608 (10jhsoby) >>! In T233608#5557729, @Dvorapa wrote: > @jhsoby from IRC: it works almost exactly 25 % of the time: https://hi.wikisource.org/wiki/... [23:06:40] (03PS1) 10MaxSem: PHPUnit 6 compatibility fixes [extensions/MassMessage] - 10https://gerrit.wikimedia.org/r/541665 (https://phabricator.wikimedia.org/T192167)