Mindbody api(使用python)发出的格式不正确(无效令牌)

时间:2016-11-25 11:30:53

标签: python xml suds mindbody

嗨朋友们我正在尝试使用python实现Mindbody API。但我得到的错误导致我的工作失败。显示页面错误。

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

实际上我无法解决此问题,也不知道错误背后的原因

1 个答案:

答案 0 :(得分:0)

您似乎正在实施第三方API,因此您应该注意发送到服务器的输入。主要是由于输入格式不正确而导致此类错误,服务器无法理解您的请求。因此,请检查您是否正在按照格式使用所需参数进行正确的服务呼叫。请参阅MindBody Api documentation

这里可以找到MindBody pyton integration http://www.mindbodydeveloper.com/mindbody-integration-python-example/

的好例子和解释