2016-11-25 21 views
-1

嗨朋友我想用Python實現Mindbody API。但我得到的錯誤導致我的工作失敗。顯示頁面錯誤。Mindbody API(使用Python)發射不良(無效令牌)

Traceback (most recent call last): 
    File "Appointment.py", line 6, in <module> 
    class AppointmentService(): 
    File "Appointment.py", line 10, in AppointmentService 
    service = Client(urlService) 
    File "C:\Python27\lib\site-packages\suds\client.py", line 112, in __init__ 
    self.wsdl = reader.open(url) 
    File "C:\Python27\lib\site-packages\suds\reader.py", line 152, in open 
    d = self.fn(url, self.options) 
    File "C:\Python27\lib\site-packages\suds\wsdl.py", line 136, in __init__ 
    d = reader.open(url) 
    File "C:\Python27\lib\site-packages\suds\reader.py", line 79, in open 
    d = self.download(url) 
    File "C:\Python27\lib\site-packages\suds\reader.py", line 101, in download 
    return sax.parse(string=content) 
    File "C:\Python27\lib\site-packages\suds\sax\parser.py", line 136, in parse 
    sax.parse(source) 
    File "C:\Python27\lib\xml\sax\expatreader.py", line 110, in parse 
    xmlreader.IncrementalParser.parse(self, source) 
    File "C:\Python27\lib\xml\sax\xmlreader.py", line 123, in parse 
    self.feed(buffer) 
    File "C:\Python27\lib\xml\sax\expatreader.py", line 217, in feed 
    self._err_handler.fatalError(exc) 
    File "C:\Python27\lib\xml\sax\handler.py", line 38, in fatalError 
    raise exception 
xml.sax._exceptions.SAXParseException: <unknown>:9:673: not well-formed (invalid token) 

enter image description here

其實我無法解決這個問題,不知道錯誤

+0

你或許應該提供一張你的代碼生成此錯誤。 –

回答

0

看來要實現第三方API,所以你應該輸入照顧背後的原因,這被髮送到服務器。主要是由於輸入格式不正確而導致發生此類錯誤,並且服務器無法理解您的請求。因此,請檢查您是否按照格式打出了具有所需參數的正確服務呼叫。請參閱MindBody Api documentation

很好的例子和說明可以在這裏找到適合MINDBODY pyton整合http://www.mindbodydeveloper.com/mindbody-integration-python-example/