Last modified: 2014-11-02 12:25:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71015, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69015 - cfd assumes family wikipedia
cfd assumes family wikipedia
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
core-(2.0)
All All
: High minor
: ---
Assigned To: Pywikipedia bugs
: easy
Depends on:
Blocks: pwb_script_tests
  Show dependency treegraph
 
Reported: 2014-08-01 17:24 UTC by John Mark Vandenberg
Modified: 2014-11-02 12:25 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-08-01 17:24:26 UTC
If script cfd is run with family wikidata, it throws NoSuchSite.

Traceback (most recent call last):
  File "pwb.py", line 157, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 67, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "scripts/cfd.py", line 178, in <module>
    main()
  File "scripts/cfd.py", line 69, in main
    for line in page.get().split("\n"):
  File ".../pywikibot/__init__.py", line 432, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/__init__.py", line 432, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/page.py", line 315, in get
    self._getInternals(sysop)
  File ".../pywikibot/page.py", line 339, in _getInternals
    self.site.loadrevisions(self, getText=True, sysop=sysop)
  File ".../pywikibot/page.py", line 121, in site
    return self._link.site
  File ".../pywikibot/page.py", line 3750, in site
    self.parse()
  File ".../pywikibot/page.py", line 3673, in parse
    newsite = pywikibot.Site(otherlang, familyName)
  File ".../pywikibot/__init__.py", line 483, in Site
    _sites[key] = __Site(code=code, fam=fam, user=user, sysop=sysop)
  File ".../pywikibot/site.py", line 635, in __init__
    BaseSite.__init__(self, code, fam, user, sysop)
  File ".../pywikibot/site.py", line 166, in __init__
    % (self.__code, self.__family.name))
pywikibot.exceptions.NoSuchSite: Language wikidata does not exist in family wikipedia
<class 'pywikibot.exceptions.NoSuchSite'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
Comment 1 Mpaa 2014-08-04 19:27:40 UTC
Same for commons.
Comment 2 Mpaa 2014-08-04 21:33:54 UTC
It looks like the script is supposed to work only on wikipedia.

# The location of the CFD working page.
24 cfdPage = u'Wikipedia:Categories for discussion/Working'
Comment 3 xqt 2014-09-10 12:43:51 UTC
Seems it's a single purpose bot for en-wiki.
Comment 4 John Mark Vandenberg 2014-11-02 12:15:45 UTC
So we should add a check in main() to exit if the config/args site is not en.wp?
Or ignore the config/args and use en.wp anyway?
Comment 5 Fabian 2014-11-02 12:25:40 UTC
I'd recommend the first, so someone doesn't accidentally execute it on en.wp, and if someone does want to use it on en.wp they could use -family: and -code: or change the user-config depending on their preference.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links