Page MenuHomePhabricator
Paste P2440

copyvios traceback (trying to change defaultsite)
ActivePublic

Authored by Fhocutt on Dec 18 2015, 10:10 PM.
Tags
None
Referenced Files
F3121673: copyvios traceback (trying to change defaultsite)
Feb 24 2016, 5:27 AM
Subscribers
None
Traceback (most recent call last):
File "app.py", line 38, in inner
return func(*args, **kwargs)
File "app.py", line 103, in index
update_sites()
File "/home/fhocutt/bots/copyvios/copyvios/sites.py", line 35, in update_sites
cache.langs, cache.projects = _load_sites()
File "/home/fhocutt/bots/copyvios/copyvios/sites.py", line 39, in _load_sites
site = cache.bot.wiki.get_site()
File "/home/fhocutt/bots/copyvios/earwigbot/earwigbot/wiki/sitesdb.py", line 335, in get_site
return self._get_site_object(default)
File "/home/fhocutt/bots/copyvios/earwigbot/earwigbot/wiki/sitesdb.py", line 135, in _get_site_object
site = self._make_site_object(name)
File "/home/fhocutt/bots/copyvios/earwigbot/earwigbot/wiki/sitesdb.py", line 186, in _make_site_object
namespaces) = self._load_site_from_sitesdb(name)
File "/home/fhocutt/bots/copyvios/earwigbot/earwigbot/wiki/sitesdb.py", line 159, in _load_site_from_sitesdb
raise SiteNotFoundError(error)
SiteNotFoundError: Site 'enwiki' not found in the sitesdb.

Event Timeline

Fhocutt changed the title of this paste from untitled to copyvios traceback (trying to change defaultsite).Dec 18 2015, 10:10 PM
Fhocutt edited the content of this paste. (Show Details)

<Earwig> fhocutt: this should probably be tweaked internally, but you should be able to (as an immediate fix) import earwigbot; earwigbot.bot.Bot("<path to the bot's directory>").wiki.add_site(lang="en", project="wikipedia")

This at least causes different errors!