Dalba claimed this task. Dalba added a comment. I'm goint to give this another try.
The error I was getting was: $ python -m generate_family_file 'http://en.wikipedia.beta.wmflabs.org/' 'wpbeta' 'y' Running on Windows and transliteration_target is not set. Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Windows Usage: ...\pywikibot-core\generate_family_file.py <url> <short name> Example: ...\pywikibot-core\generate_family_file.py https://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Generating family file from http://en.wikipedia.beta.wmflabs.org/ Traceback (most recent call last): File "...\Python\Python35-32\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "...\Python\Python35-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "...\pywikibot-core\generate_family_file.py", line 205, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "...\pywikibot-core\generate_family_file.py", line 65, in run self.wikis[w.iwpath] = w File "...\pywikibot-core\pywikibot\site_detect.py", line 181, in iwpath return self.server + self.articlepath TypeError: Can't convert 'NoneType' object to str implicitly <class 'TypeError'> CRITICAL: Closing network session. Tracing the error led me to MediaWikiVersion.MEDIAWIKI_VERSION.match("1.27.0-alpha").group(2) which is "-alpha" and not "alpha". This was causing the following error: >>> import pywikibot >>> pywikibot.tools.MediaWikiVersion().parse('1.27.0-alpha') Traceback (most recent call last): File "<pyshell#43>", line 1, in <module> pywikibot.tools.MediaWikiVersion().parse('1.27.0-alpha') File "...\pywikibot-core\pywikibot\tools\__init__.py", line 456, in parse 'Found "{0}" in "{1}"'.format(handled, version_match.group(2)) AssertionError: Found "alpha" in "-alpha" Because of that error which was being catched by a try-except clause, "generate_family_file.py" could not create the MWSite object completely for beta-cluster wikis. After fixing the above issue, the script works fine for me. TASK DETAIL https://phabricator.wikimedia.org/T109164 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dalba Cc: gerritbot, Dalba, Aklapper, jayvdb, pywikibot-bugs-list _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
