-1

嗨朋友们,我正在尝试使用 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)

在此处输入图像描述

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

4

1 回答 1

0

看来您正在实现第三方 API,因此您应该处理发送到服务器的输入。主要是由于输入格式不正确和服务器无法理解您的请求而发生此类错误。因此,请检查您是否使用格式中的必需参数打了正确的服务呼叫。请参考MindBody Api 文档

可以在此处找到 MindBody pyton 集成的良好示例和解释http://www.mindbodydeveloper.com/mindbody-integration-python-example/

于 2016-11-26T06:03:28.347 回答