Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 没有这样的方法:getAuthToken_Python 2.7_Xmlrpclib_Moinmoin - Fatal编程技术网

Python 2.7 没有这样的方法:getAuthToken

Python 2.7 没有这样的方法:getAuthToken,python-2.7,xmlrpclib,moinmoin,Python 2.7,Xmlrpclib,Moinmoin,我正在尝试编写一个脚本,以通过未在我的计算机上运行的MoinMoin Wiki进行身份验证。根据官方MoinMoin wiki页面上的信息(见第3.11节),我假设我的方法是正确的 我的代码如下: import ssl import xmlrpclib def getCustomerPages(): #list of page names: pageNames = [] #setup MoinMoin: name = "username" passw

我正在尝试编写一个脚本,以通过未在我的计算机上运行的MoinMoin Wiki进行身份验证。根据官方MoinMoin wiki页面上的信息(见第3.11节),我假设我的方法是正确的

我的代码如下:

import ssl
import xmlrpclib

def getCustomerPages():

    #list of page names:
    pageNames = []

    #setup MoinMoin:
    name = "username"
    password = "password"
    wikiUrl = "url"

    myWiki = xmlrpclib.ServerProxy(wikiUrl + "?action=xmlrpc2", allow_none = True,
    context=ssl._create_unverified_context())

    authToken = myWiki.getAuthToken(name, password)

    print(authToken)

    mc = xmlrpclib.MultiCall(myWiki)
    mc.applyAuthToken(authToken)

getCustomerPages()    
值得注意的是,我尝试连接到的wiki没有良好的SSL证书。因此,我在
xmlrpclib.ServerProxy()

当我运行此代码时,会出现以下错误:

{'faultCode': 1, 'faultString': 'No such method: getAuthToken.'}
我查看了其他代码,他们似乎使用的方法很好,但基本上与我的代码相同。有关其用法的示例,请参见

有人能帮我理解并修复这个错误吗