[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-18 Thread zhuyifei1999
zhuyifei1999 added a comment.

In T202117#4510925, @Xqt wrote:
svn repository is still supported by pwb which is cloned from our git repository. I use svn for my production not because the automerge function of svn is a great advantage against git.


Wasn't aware of that, thanks.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: Xqt, zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Yerpo
Yerpo added a comment.
I suspect that, although you have updated the repo, the 'installed' one in C:\Program Files (x86)\Python27\lib\site-packages\pywikibot\ remain outdated.

You were completely right, zhuyifei1999, the "installed" repo was outdated. Everything works as it should now, so someone can mark this ticket solved.

And sorry for making everybody solve what turned out to be my local problem.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: YerpoCc: Xqt, zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Xqt
Xqt added a comment.
We have moved to git and are no longer on svn. Can you show us your output of python pwb.oy version?

svn repository is still supported by pwb which is cloned from our git repository. I use svn for my production not because the automerge function of svn is a great advantage against git.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: Xqt, zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread zhuyifei1999
zhuyifei1999 added a comment.
File "C:\Users\yerpc\Documents\Wiki\Scripts\MakeScoreTable.py", line 877, in CalculateStatisticsForLang
  wiki = pywikibot.Site(lang, 'wikipedia')

$ python pwb.py shell
family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Welcome to the Pywikibot interactive shell!
>>> pywikibot.Site('atj', 'wikipedia')
APISite("atj", "wikipedia")
>>> 

Still can't reproduce.

Considering that your traceback does not indicate it being started by pwb.py, I suspect that, although you have updated the repo, the 'installed' one in C:\Program Files (x86)\Python27\lib\site-packages\pywikibot\ remain outdated. The version that is shown by pwb.py version shows the repo version and does not reflect the installed version in site-packages.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Yerpo
Yerpo added a comment.
We have moved to git and are no longer on svn. Can you show us your output of python pwb.oy version?

Odd, there are changes every time I run the update, but I'll look into updating by git, thanks for the note. Here's the version:

Pywikibot: pywikibot-core (2210724, s10199, 2018/08/17, 13:12:33, ok)
Release version: 3.1.dev0
requests version: 2.13.0
  cacerts: C:\Program Files (x86)\Python27\lib\site-packages\requests\cacert.pem
certificate test: ok
Python: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
PYWIKIBOT_DIR: Not set
PYWIKIBOT_DIR_PWB:
PYWIKIBOT_NO_USER_CONFIG: Not set



Listed on your local copy as well?

Yes.

I updated the script on Meta now. Here's the traceback:

Traceback (most recent call last):
  File "C:\Users\yerpc\Documents\Wiki\Scripts\MakeScoreTable.py", line 877, in CalculateStatisticsForLang
wiki = pywikibot.Site(lang, 'wikipedia')
  File "C:\Program Files (x86)\Python27\lib\site-packages\pywikibot\__init__.py", line 910, in Site
_sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop)
  File "C:\Program Files (x86)\Python27\lib\site-packages\pywikibot\site.py", line 1857, in __init__
BaseSite.__init__(self, code, fam, user, sysop)
  File "C:\Program Files (x86)\Python27\lib\site-packages\pywikibot\site.py", line 773, in __init__
% (self.__code, self.__family.name))
UnknownSite: Language 'atj' does not exist in family wikipediaTASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: YerpoCc: zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread zhuyifei1999
zhuyifei1999 added a comment.

In T202117#4510645, @Yerpo wrote:
Yes, I always do SVN update before running the script.


We have moved to git and are no longer on svn. Can you show us your output of python pwb.oy version?

The wikimedia_family.py file doesn't seem to be the issue, because all the "missing" Wikipedias are listed there.

Listed on your local copy as well?

Could someone please check the script to see where it draws the information from?

You mean https://meta.wikimedia.org/wiki/List_of_Wikipedias_by_sample_of_articles/Source_code? Do you have a complete traceback of the error (if not, a complete error message)? I don't see the script listing any of the mentioned languages. If you have updated the script, then please paste your updated script there.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Yerpo
Yerpo added a comment.
Are you on the latest version of pywikibot?

Yes, I always do SVN update before running the script.

The wikimedia_family.py file doesn't seem to be the issue, because all the "missing" Wikipedias are listed there. Could someone please check the script to see where it draws the information from? I'm not very good at Python, I just run this every month after the script's author said he won't do it anymore.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: YerpoCc: zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread zhuyifei1999
zhuyifei1999 added a comment.
Can't reproduce.

$ python pwb.py version
family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Pywikibot: [https] wikimedia-pywikibot-core.git (8e4837b, g9914, 2018/08/17, 10:10:15, ok)
Release version: 3.1.dev0
requests version: 2.19.1
  cacerts: /etc/ssl/certs/ca-certificates.crt
certificate test: ok
Python: 3.6.6 (default, Jul 30 2018, 02:34:07) 
[GCC 7.3.0]
PYWIKIBOT_DIR: Not set
PYWIKIBOT_DIR_PWB: 
PYWIKIBOT_NO_USER_CONFIG: Not set
Config base dir: /home/zhuyifei1999/mw-dev/pywikibot-core
$ python pwb.py shell
family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Welcome to the Pywikibot interactive shell!
>>> for site in ['atjwiki', 'dtywiki', 'gorwiki', 'inhwiki', 'kbpwiki', 'lfnwiki']:
... pywikibot.Site().fromDBName(site)
... 
APISite("atj", "wikipedia")
APISite("dty", "wikipedia")
APISite("gor", "wikipedia")
APISite("inh", "wikipedia")
APISite("kbp", "wikipedia")
APISite("lfn", "wikipedia")
>>> 

Are you on the latest version of pywikibot?TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: zhuyifei1999, pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Aklapper
Aklapper added a comment.
Ah, got it, sorry!
This seems to be about updating https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/families/wikipedia_family.py

If you feel like fixing this yourself, see https://www.mediawiki.org/wiki/Gerrit/Tutorial how to provide a patch:)TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AklapperCc: pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T202117: Add new Wikipedias to wikipedia family file

2018-08-17 Thread Yerpo
Yerpo added a comment.
Thank you, Pywikibot-core is probably a better place for this.

Like I said, I'm not sure what and where needs to be updated, I just wanted to point out that the Pywikibot's framework obviously doesn't recognize some newest Wikipedias, but it should recognize all Wikipedias in the List of Wikipedias.TASK DETAILhttps://phabricator.wikimedia.org/T202117EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: YerpoCc: pywikibot-bugs-list, Yerpo, Aklapper, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs