[Pywikipedia-l] A strange problem in rewrite branch

Liangent liangent at gmail.com
Mon Apr 20 10:35:49 UTC 2009


liangent at oiweb:~/wiki/bot/archiver$ ./archiver.py
Found 1 wikipedia:zh processes running, including this one.
Traceback (most recent call last):
  File "./archiver.py", line 7, in <module>
    now = Site().getcurrenttime() # or from link's site?
  File "/usr/lib/python2.5/site-packages/pywikibot/site.py", line 794, in
getcurrenttime
    ts = self.getcurrenttimestamp()
  File "/usr/lib/python2.5/site-packages/pywikibot/site.py", line 789, in
getcurrenttimestamp
    result = r.submit()
  File "/usr/lib/python2.5/site-packages/pywikibot/data/api.py", line 184,
in submit
    self.site.throttle(write=write)
  File "/usr/lib/python2.5/site-packages/pywikibot/site.py", line 176, in
__getattr__
    return self.__class__.attr
AttributeError: type object 'APISite' has no attribute 'attr'
liangent at oiweb:~/wiki/bot/archiver$

this problem doesn't occur frequently, and i don't know when it will occur.

the script archiver.py's first lines are:

#!/usr/bin/env python
# -*- coding: utf_8 -*-
import re
import pywikibot
from pywikibot import Link, Site, Page
import datetime
now = Site().getcurrenttime() # or from link's site?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20090420/e3303816/attachment.htm 


More information about the Pywikipedia-l mailing list