我已经为 Wikipedia 编写了一个脚本,它在我的计算机上运行良好,但是当我将它上传到我的网络主机(Dreamhost)时它不起作用并说我尝试登录的用户被阻止 - 这不是是的,它可以在我的电脑上运行并且我没有被阻止。这是我得到的确切错误消息-
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/tris1601/thewikipediaforum.com/pywikipedia/wikitest.py
35 site = wikipedia.getSite()
36 newpage = wikipedia.Page(site, u"User:Dottydotdot/test")
37 newpage.put(text + "<br><br>'''Imported from [http://en.wikiquote.org '''Wikiquote'''] by [[User:DottyQuoteBot|'''DottyQuoteBot''']]", u"Testing")
38
39 wikipedia.stopme()
newpage = Page{[[User:Dottydotdot/test]]}, newpage.put = <bound method Page.put of Page{[[User:Dottydotdot/test]]}>, text = u'You have so many things in the background that y... could possibly work?" <p> [[Ward Cunningham]] \n'
/home/tris1601/thewikipediaforum.com/pywikipedia/wikipedia.py in put(self=Page{[[User:Dottydotdot/test]]}, newtext=u"You have so many things in the background that y...''] by [[User:DottyQuoteBot|'''DottyQuoteBot''']]", comment=u'Testing', watchArticle=None, minorEdit=True, force=False, sysop=False, botflag=True)
1380
1381 # Check blocks
1382 self.site().checkBlocks(sysop = sysop)
1383
1384 # Determine if we are allowed to edit
self = Page{[[User:Dottydotdot/test]]}, self.site = <bound method Page.site of Page{[[User:Dottydotdot/test]]}>, ).checkBlocks undefined, sysop = False
/home/tris1601/thewikipediaforum.com/pywikipedia/wikipedia.py in checkBlocks(self=wikipedia:en, sysop=False)
4457 if self._isBlocked[index]:
4458 # User blocked
4459 raise UserBlocked('User is blocked in site %s' % self)
4460
4461 def isBlocked(self, sysop = False):
global UserBlocked = <class wikipedia.UserBlocked>, self = wikipedia:en
UserBlocked: User is blocked in site wikipedia:en
args = ('User is blocked in site wikipedia:en',)
关于为什么它不起作用的任何想法?
谢谢,非常感谢!