amir@nightshade:~$ python blockips.py User name '1.161.100.110' is invalid. IP addresses are not supported. Traceback (most recent call last): File "blockips.py", line 23, in <module> user.block(expiry="one year",reason="{{پروکسی باز}}",anon=True) File "/home/amir/userlib.py", line 383, in block if self.isBlocked() and not reBlock: File "/home/amir/userlib.py", line 121, in isBlocked self._load() File "/home/amir/userlib.py", line 96, in _load getall(self.site(), [self], force=True) File "/home/amir/userlib.py", line 540, in getall _GetAllUI(site, users, throttle, force).run() File "/home/amir/userlib.py", line 559, in run data = self.getData() File "/home/amir/userlib.py", line 595, in getData raise InvalidUser("User name '%s' is invalid. IP addresses are not supported." % user['name']) userlib.InvalidUser: User name '1.161.100.110' is invalid. IP addresses are not supported.
My code is: import re import wikipedia, userlib import query, config, codecs f=codecs.open(u"ipblock.txt",u"r",u"utf-8") aaa=f.read() f.close() rr=re.compile(u"[[(.+?)]]") site=wikipedia.getSite() for username in rr.findall(aaa): if u"." in username: user=userlib.User(site,username) user.block(expiry="one year",reason="{{پروکسی باز}}",anon=True)
On 11/10/11, Amir Ladsgroup ladsgroup@gmail.com wrote:
using userlib.py code you must wait for full of the error code. sorry:(
On 11/10/11, Merlijn van Deen valhallasw@arctus.nl wrote:
On 10 November 2011 14:31, Amir Ladsgroup ladsgroup@gmail.com wrote:
It gives me this error: raise InvalidUser("User name '%s' is invalid. IP addresses are not supported." % user['name'])
Using which code? And what is the *complete* stack trace (list of file names and functions) you get...?
Merlijn
-- Amir